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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
b400f09246
commit
f76280154c
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include "gspca.h"
|
#include "gspca.h"
|
||||||
|
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/usb/input.h>
|
#include <linux/usb/input.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -115,7 +115,7 @@ static const struct vm_operations_struct gspca_vm_ops = {
|
|||||||
/*
|
/*
|
||||||
* Input and interrupt endpoint handling functions
|
* Input and interrupt endpoint handling functions
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
static void int_irq(struct urb *urb)
|
static void int_irq(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
|
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)
|
|||||||
usb_free_urb(urb);
|
usb_free_urb(urb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void gspca_input_destroy_urb(struct gspca_dev *gspca_dev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void gspca_input_create_urb(struct gspca_dev *gspca_dev)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int gspca_input_connect(struct gspca_dev *dev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* get the current input frame buffer */
|
/* get the current input frame buffer */
|
||||||
@@ -2310,7 +2323,7 @@ int gspca_dev_probe(struct usb_interface *intf,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out:
|
out:
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
if (gspca_dev->input_dev)
|
if (gspca_dev->input_dev)
|
||||||
input_unregister_device(gspca_dev->input_dev);
|
input_unregister_device(gspca_dev->input_dev);
|
||||||
#endif
|
#endif
|
||||||
@@ -2329,7 +2342,7 @@ EXPORT_SYMBOL(gspca_dev_probe);
|
|||||||
void gspca_disconnect(struct usb_interface *intf)
|
void gspca_disconnect(struct usb_interface *intf)
|
||||||
{
|
{
|
||||||
struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
|
struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
struct input_dev *input_dev;
|
struct input_dev *input_dev;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2343,7 +2356,7 @@ void gspca_disconnect(struct usb_interface *intf)
|
|||||||
wake_up_interruptible(&gspca_dev->wq);
|
wake_up_interruptible(&gspca_dev->wq);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
gspca_input_destroy_urb(gspca_dev);
|
gspca_input_destroy_urb(gspca_dev);
|
||||||
input_dev = gspca_dev->input_dev;
|
input_dev = gspca_dev->input_dev;
|
||||||
if (input_dev) {
|
if (input_dev) {
|
||||||
|
@@ -130,7 +130,7 @@ struct sd_desc {
|
|||||||
cam_reg_op get_register;
|
cam_reg_op get_register;
|
||||||
#endif
|
#endif
|
||||||
cam_ident_op get_chip_ident;
|
cam_ident_op get_chip_ident;
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
cam_int_pkt_op int_pkt_scan;
|
cam_int_pkt_op int_pkt_scan;
|
||||||
/* other_input makes the gspca core create gspca_dev->input even when
|
/* other_input makes the gspca core create gspca_dev->input even when
|
||||||
int_pkt_scan is NULL, for cams with non interrupt driven buttons */
|
int_pkt_scan is NULL, for cams with non interrupt driven buttons */
|
||||||
@@ -158,7 +158,7 @@ struct gspca_dev {
|
|||||||
struct module *module; /* subdriver handling the device */
|
struct module *module; /* subdriver handling the device */
|
||||||
struct usb_device *dev;
|
struct usb_device *dev;
|
||||||
struct file *capt_file; /* file doing video capture */
|
struct file *capt_file; /* file doing video capture */
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
struct input_dev *input_dev;
|
struct input_dev *input_dev;
|
||||||
char phys[64]; /* physical device path */
|
char phys[64]; /* physical device path */
|
||||||
#endif
|
#endif
|
||||||
@@ -171,7 +171,7 @@ struct gspca_dev {
|
|||||||
#define USB_BUF_SZ 64
|
#define USB_BUF_SZ 64
|
||||||
__u8 *usb_buf; /* buffer for USB exchanges */
|
__u8 *usb_buf; /* buffer for USB exchanges */
|
||||||
struct urb *urb[MAX_NURBS];
|
struct urb *urb[MAX_NURBS];
|
||||||
#ifdef CONFIG_INPUT
|
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
||||||
struct urb *int_urb;
|
struct urb *int_urb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user