diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-02-18 13:02:51 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:11:04 -0500 |
commit | e070bf9ef85e293d9dc586fbfabc008795564c0e (patch) | |
tree | 905fcfd9c4ac8724c9e0646cc5dbe0b6ae458cad /drivers | |
parent | 1e5eb1133aac7982dd941b473e23cd396acb2706 (diff) |
V4L/DVB: gspca - main: Fix a compile error when CONFIG_INPUT is not set
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 1e24acd4d940..96a77697eb1e 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -40,8 +40,10 @@ | |||
40 | 40 | ||
41 | #include "gspca.h" | 41 | #include "gspca.h" |
42 | 42 | ||
43 | #ifdef CONFIG_INPUT | ||
43 | #include <linux/input.h> | 44 | #include <linux/input.h> |
44 | #include <linux/usb/input.h> | 45 | #include <linux/usb/input.h> |
46 | #endif | ||
45 | 47 | ||
46 | /* global values */ | 48 | /* global values */ |
47 | #define DEF_NURBS 3 /* default number of URBs */ | 49 | #define DEF_NURBS 3 /* default number of URBs */ |
@@ -2329,7 +2331,9 @@ EXPORT_SYMBOL(gspca_dev_probe); | |||
2329 | void gspca_disconnect(struct usb_interface *intf) | 2331 | void gspca_disconnect(struct usb_interface *intf) |
2330 | { | 2332 | { |
2331 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); | 2333 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); |
2334 | #ifdef CONFIG_INPUT | ||
2332 | struct input_dev *input_dev; | 2335 | struct input_dev *input_dev; |
2336 | #endif | ||
2333 | 2337 | ||
2334 | PDEBUG(D_PROBE, "%s disconnect", | 2338 | PDEBUG(D_PROBE, "%s disconnect", |
2335 | video_device_node_name(&gspca_dev->vdev)); | 2339 | video_device_node_name(&gspca_dev->vdev)); |
@@ -2341,12 +2345,14 @@ void gspca_disconnect(struct usb_interface *intf) | |||
2341 | wake_up_interruptible(&gspca_dev->wq); | 2345 | wake_up_interruptible(&gspca_dev->wq); |
2342 | } | 2346 | } |
2343 | 2347 | ||
2348 | #ifdef CONFIG_INPUT | ||
2344 | gspca_input_destroy_urb(gspca_dev); | 2349 | gspca_input_destroy_urb(gspca_dev); |
2345 | input_dev = gspca_dev->input_dev; | 2350 | input_dev = gspca_dev->input_dev; |
2346 | if (input_dev) { | 2351 | if (input_dev) { |
2347 | gspca_dev->input_dev = NULL; | 2352 | gspca_dev->input_dev = NULL; |
2348 | input_unregister_device(input_dev); | 2353 | input_unregister_device(input_dev); |
2349 | } | 2354 | } |
2355 | #endif | ||
2350 | 2356 | ||
2351 | /* the device is freed at exit of this function */ | 2357 | /* the device is freed at exit of this function */ |
2352 | gspca_dev->dev = NULL; | 2358 | gspca_dev->dev = NULL; |