Commit cd219de0 authored by Mike Isely's avatar Mike Isely Committed by Greg Kroah-Hartman

V4L: pvrusb2: Suppress compiler warning

The pvrusb2 driver needs to call video_devdata() in order to correctly
transform a file pointer into a video_device pointer.  Unfortunately
the prototype for this function has been marked V4L1-only and there's
no official substitute that I can find for V4L2.  Adding to the
mystery is that the implementation for this function exists whether or
not V4L1 compatibility has been selected.  The upshot of all this is
that we get a compilation warning here about a missing prototype but
the code links OK.  This fix solves the warning by copying the
prototype into the source file that is using it.  Yes this is a hack,
but it's a safe one for 2.6.18 (any alternative would be much more
intrusive).  A better solution should be forthcoming for the next
kernel.
Signed-off-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 931dae02
......@@ -32,6 +32,12 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
/* Mike Isely <isely@pobox.com> 23-Sep-2006 - This function is prototyped
* only for V4L1 but is implemented regardless of the V4L1 compatibility
* option state. V4L2 has no replacement for this and we need it. For now
* copy the prototype here so we can avoid the compiler warning. */
extern struct video_device* video_devdata(struct file*);
struct pvr2_v4l2_dev;
struct pvr2_v4l2_fh;
struct pvr2_v4l2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment