Skip to content

Commit

Permalink
[media] ivtv: replace ugly casts with a proper container_of
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 6aff72f commit 2f82441
Showing 1 changed file with 50 additions and 50 deletions.
Loading

0 comments on commit 2f82441

Please sign in to comment.