aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-03-30 13:32:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:30 -0400
commitf76280154cdbb0ad02d5402972d1eb85f9e2898a (patch)
treeb606ddd799bad2c91170ab2626442d299b8c2520 /drivers/media/video/gspca
parentb400f09246247e2c55b116bd7b71da4fb0cb19dc (diff)
V4L/DVB: [-next] gspca: fix build for INPUT=m or INPUT=n
Handle case of GSPCA=m, INPUT=m when building gspca core; also handle case of INPUT=n by using stubs. drivers/media/video/gspca/gspca.c:662: error: implicit declaration of function 'gspca_input_destroy_urb' drivers/media/video/gspca/gspca.c:668: error: implicit declaration of function 'gspca_input_create_urb' drivers/media/video/gspca/gspca.c:2284: error: implicit declaration of function 'gspca_input_connect' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/gspca.c23
-rw-r--r--drivers/media/video/gspca/gspca.h6
2 files changed, 21 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 1830ea9e73b0..972f637c9740 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -40,7 +40,7 @@
40 40
41#include "gspca.h" 41#include "gspca.h"
42 42
43#ifdef CONFIG_INPUT 43#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
44#include <linux/input.h> 44#include <linux/input.h>
45#include <linux/usb/input.h> 45#include <linux/usb/input.h>
46#endif 46#endif
@@ -115,7 +115,7 @@ static const struct vm_operations_struct gspca_vm_ops = {
115/* 115/*
116 * Input and interrupt endpoint handling functions 116 * Input and interrupt endpoint handling functions
117 */ 117 */
118#ifdef CONFIG_INPUT 118#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
119static void int_irq(struct urb *urb) 119static void int_irq(struct urb *urb)
120{ 120{
121 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; 121 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
@@ -279,6 +279,19 @@ static void gspca_input_destroy_urb(struct gspca_dev *gspca_dev)
279 usb_free_urb(urb); 279 usb_free_urb(urb);
280 } 280 }
281} 281}
282#else
283static inline void gspca_input_destroy_urb(struct gspca_dev *gspca_dev)
284{
285}
286
287static inline void gspca_input_create_urb(struct gspca_dev *gspca_dev)
288{
289}
290
291static inline int gspca_input_connect(struct gspca_dev *dev)
292{
293 return 0;
294}
282#endif 295#endif
283 296
284/* get the current input frame buffer */ 297/* get the current input frame buffer */
@@ -2310,7 +2323,7 @@ int gspca_dev_probe(struct usb_interface *intf,
2310 2323
2311 return 0; 2324 return 0;
2312out: 2325out:
2313#ifdef CONFIG_INPUT 2326#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
2314 if (gspca_dev->input_dev) 2327 if (gspca_dev->input_dev)
2315 input_unregister_device(gspca_dev->input_dev); 2328 input_unregister_device(gspca_dev->input_dev);
2316#endif 2329#endif
@@ -2329,7 +2342,7 @@ EXPORT_SYMBOL(gspca_dev_probe);
2329void gspca_disconnect(struct usb_interface *intf) 2342void gspca_disconnect(struct usb_interface *intf)
2330{ 2343{
2331 struct gspca_dev *gspca_dev = usb_get_intfdata(intf); 2344 struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
2332#ifdef CONFIG_INPUT 2345#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
2333 struct input_dev *input_dev; 2346 struct input_dev *input_dev;
2334#endif 2347#endif
2335 2348
@@ -2343,7 +2356,7 @@ void gspca_disconnect(struct usb_interface *intf)
2343 wake_up_interruptible(&gspca_dev->wq); 2356 wake_up_interruptible(&gspca_dev->wq);
2344 } 2357 }
2345 2358
2346#ifdef CONFIG_INPUT 2359#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
2347 gspca_input_destroy_urb(gspca_dev); 2360 gspca_input_destroy_urb(gspca_dev);
2348 input_dev = gspca_dev->input_dev; 2361 input_dev = gspca_dev->input_dev;
2349 if (input_dev) { 2362 if (input_dev) {
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index 8bb242fb79de..8b963dfae861 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -130,7 +130,7 @@ struct sd_desc {
130 cam_reg_op get_register; 130 cam_reg_op get_register;
131#endif 131#endif
132 cam_ident_op get_chip_ident; 132 cam_ident_op get_chip_ident;
133#ifdef CONFIG_INPUT 133#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
134 cam_int_pkt_op int_pkt_scan; 134 cam_int_pkt_op int_pkt_scan;
135 /* other_input makes the gspca core create gspca_dev->input even when 135 /* other_input makes the gspca core create gspca_dev->input even when
136 int_pkt_scan is NULL, for cams with non interrupt driven buttons */ 136 int_pkt_scan is NULL, for cams with non interrupt driven buttons */
@@ -158,7 +158,7 @@ struct gspca_dev {
158 struct module *module; /* subdriver handling the device */ 158 struct module *module; /* subdriver handling the device */
159 struct usb_device *dev; 159 struct usb_device *dev;
160 struct file *capt_file; /* file doing video capture */ 160 struct file *capt_file; /* file doing video capture */
161#ifdef CONFIG_INPUT 161#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
162 struct input_dev *input_dev; 162 struct input_dev *input_dev;
163 char phys[64]; /* physical device path */ 163 char phys[64]; /* physical device path */
164#endif 164#endif
@@ -171,7 +171,7 @@ struct gspca_dev {
171#define USB_BUF_SZ 64 171#define USB_BUF_SZ 64
172 __u8 *usb_buf; /* buffer for USB exchanges */ 172 __u8 *usb_buf; /* buffer for USB exchanges */
173 struct urb *urb[MAX_NURBS]; 173 struct urb *urb[MAX_NURBS];
174#ifdef CONFIG_INPUT 174#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
175 struct urb *int_urb; 175 struct urb *int_urb;
176#endif 176#endif
177 177