mirror of
https://github.com/torvalds/linux
synced 2024-10-18 09:18:26 +00:00
[media] usb/gspca: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
a3f6ce6345
commit
13a00fabe4
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
#include "gspca.h"
|
#include "gspca.h"
|
||||||
|
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/usb/input.h>
|
#include <linux/usb/input.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -118,7 +118,7 @@ static const struct vm_operations_struct gspca_vm_ops = {
|
||||||
/*
|
/*
|
||||||
* Input and interrupt endpoint handling functions
|
* Input and interrupt endpoint handling functions
|
||||||
*/
|
*/
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
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;
|
||||||
|
@ -2303,7 +2303,7 @@ int gspca_dev_probe2(struct usb_interface *intf,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
out:
|
out:
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
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
|
||||||
|
@ -2348,7 +2348,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);
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
struct input_dev *input_dev;
|
struct input_dev *input_dev;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2360,7 +2360,7 @@ void gspca_disconnect(struct usb_interface *intf)
|
||||||
gspca_dev->present = 0;
|
gspca_dev->present = 0;
|
||||||
destroy_urbs(gspca_dev);
|
destroy_urbs(gspca_dev);
|
||||||
|
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
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) {
|
||||||
|
|
|
@ -138,7 +138,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;
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
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 */
|
||||||
|
@ -167,7 +167,7 @@ struct gspca_dev {
|
||||||
struct usb_device *dev;
|
struct usb_device *dev;
|
||||||
struct file *capt_file; /* file doing video capture */
|
struct file *capt_file; /* file doing video capture */
|
||||||
/* protected by queue_lock */
|
/* protected by queue_lock */
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
struct input_dev *input_dev;
|
struct input_dev *input_dev;
|
||||||
char phys[64]; /* physical device path */
|
char phys[64]; /* physical device path */
|
||||||
#endif
|
#endif
|
||||||
|
@ -190,7 +190,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];
|
||||||
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
|
#if IS_ENABLED(CONFIG_INPUT)
|
||||||
struct urb *int_urb;
|
struct urb *int_urb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue