[media] ivtv: replace ugly casts with a proper container_of
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 12 Mar 2011 09:43:28 +0000 (06:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 19:38:12 +0000 (16:38 -0300)
commit2f82441a8644287e5b647329cc30b590f6fd3714
tree63795d3ea4a1449b6dbbd84fa0c6465798bc58a7
parent6aff72f6d511bcadbc71358ed17bc87edbf90716
[media] ivtv: replace ugly casts with a proper container_of

ivtv-ioctl cast the 'void *fh' directly to 'ivtv_open_id *'. This should be
done properly with a contained_of since the 'void *fh' is really a
'struct v4l2_fh *'.

It worked because the v4l2_fh field is also the first field in the ivtv_open_id
struct, but it is not clean code.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/ivtv/ivtv-ioctl.c