From e070bf9ef85e293d9dc586fbfabc008795564c0e Mon Sep 17 00:00:00 2001 From: Jean-François Moine Date: Thu, 18 Feb 2010 15:02:51 -0300 Subject: V4L/DVB: gspca - main: Fix a compile error when CONFIG_INPUT is not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Randy Dunlap Signed-off-by: Jean-François Moine Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/gspca.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 1e24acd4d94..96a77697eb1 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -40,8 +40,10 @@ #include "gspca.h" +#ifdef CONFIG_INPUT #include #include +#endif /* global values */ #define DEF_NURBS 3 /* default number of URBs */ @@ -2329,7 +2331,9 @@ EXPORT_SYMBOL(gspca_dev_probe); void gspca_disconnect(struct usb_interface *intf) { struct gspca_dev *gspca_dev = usb_get_intfdata(intf); +#ifdef CONFIG_INPUT struct input_dev *input_dev; +#endif PDEBUG(D_PROBE, "%s disconnect", video_device_node_name(&gspca_dev->vdev)); @@ -2341,12 +2345,14 @@ void gspca_disconnect(struct usb_interface *intf) wake_up_interruptible(&gspca_dev->wq); } +#ifdef CONFIG_INPUT gspca_input_destroy_urb(gspca_dev); input_dev = gspca_dev->input_dev; if (input_dev) { gspca_dev->input_dev = NULL; input_unregister_device(input_dev); } +#endif /* the device is freed at exit of this function */ gspca_dev->dev = NULL; -- cgit v1.2.3-70-g09d2