diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2013-01-24 17:28:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-05 11:53:39 -0500 |
commit | 13a00fabe44874db9e693d3c2761e9b6fa344be2 (patch) | |
tree | 7e24c924a796c55d4c07d56ba7f3ee1a8c3d356c /drivers/media | |
parent | a3f6ce6345771932f4d4ba080d3a5f0846293983 (diff) |
[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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/gspca/gspca.c | 10 | ||||
-rw-r--r-- | drivers/media/usb/gspca/gspca.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index e0a431bb0d42..3564bdbb2ea3 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | #include "gspca.h" | 45 | #include "gspca.h" |
46 | 46 | ||
47 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 47 | #if IS_ENABLED(CONFIG_INPUT) |
48 | #include <linux/input.h> | 48 | #include <linux/input.h> |
49 | #include <linux/usb/input.h> | 49 | #include <linux/usb/input.h> |
50 | #endif | 50 | #endif |
@@ -118,7 +118,7 @@ static const struct vm_operations_struct gspca_vm_ops = { | |||
118 | /* | 118 | /* |
119 | * Input and interrupt endpoint handling functions | 119 | * Input and interrupt endpoint handling functions |
120 | */ | 120 | */ |
121 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 121 | #if IS_ENABLED(CONFIG_INPUT) |
122 | static void int_irq(struct urb *urb) | 122 | static void int_irq(struct urb *urb) |
123 | { | 123 | { |
124 | struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; | 124 | struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; |
@@ -2303,7 +2303,7 @@ int gspca_dev_probe2(struct usb_interface *intf, | |||
2303 | 2303 | ||
2304 | return 0; | 2304 | return 0; |
2305 | out: | 2305 | out: |
2306 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 2306 | #if IS_ENABLED(CONFIG_INPUT) |
2307 | if (gspca_dev->input_dev) | 2307 | if (gspca_dev->input_dev) |
2308 | input_unregister_device(gspca_dev->input_dev); | 2308 | input_unregister_device(gspca_dev->input_dev); |
2309 | #endif | 2309 | #endif |
@@ -2348,7 +2348,7 @@ EXPORT_SYMBOL(gspca_dev_probe); | |||
2348 | void gspca_disconnect(struct usb_interface *intf) | 2348 | void gspca_disconnect(struct usb_interface *intf) |
2349 | { | 2349 | { |
2350 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); | 2350 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); |
2351 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 2351 | #if IS_ENABLED(CONFIG_INPUT) |
2352 | struct input_dev *input_dev; | 2352 | struct input_dev *input_dev; |
2353 | #endif | 2353 | #endif |
2354 | 2354 | ||
@@ -2360,7 +2360,7 @@ void gspca_disconnect(struct usb_interface *intf) | |||
2360 | gspca_dev->present = 0; | 2360 | gspca_dev->present = 0; |
2361 | destroy_urbs(gspca_dev); | 2361 | destroy_urbs(gspca_dev); |
2362 | 2362 | ||
2363 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 2363 | #if IS_ENABLED(CONFIG_INPUT) |
2364 | gspca_input_destroy_urb(gspca_dev); | 2364 | gspca_input_destroy_urb(gspca_dev); |
2365 | input_dev = gspca_dev->input_dev; | 2365 | input_dev = gspca_dev->input_dev; |
2366 | if (input_dev) { | 2366 | if (input_dev) { |
diff --git a/drivers/media/usb/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h index 352317d7acdb..5559932bf2f5 100644 --- a/drivers/media/usb/gspca/gspca.h +++ b/drivers/media/usb/gspca/gspca.h | |||
@@ -138,7 +138,7 @@ struct sd_desc { | |||
138 | cam_reg_op get_register; | 138 | cam_reg_op get_register; |
139 | #endif | 139 | #endif |
140 | cam_ident_op get_chip_ident; | 140 | cam_ident_op get_chip_ident; |
141 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 141 | #if IS_ENABLED(CONFIG_INPUT) |
142 | cam_int_pkt_op int_pkt_scan; | 142 | cam_int_pkt_op int_pkt_scan; |
143 | /* other_input makes the gspca core create gspca_dev->input even when | 143 | /* other_input makes the gspca core create gspca_dev->input even when |
144 | int_pkt_scan is NULL, for cams with non interrupt driven buttons */ | 144 | int_pkt_scan is NULL, for cams with non interrupt driven buttons */ |
@@ -167,7 +167,7 @@ struct gspca_dev { | |||
167 | struct usb_device *dev; | 167 | struct usb_device *dev; |
168 | struct file *capt_file; /* file doing video capture */ | 168 | struct file *capt_file; /* file doing video capture */ |
169 | /* protected by queue_lock */ | 169 | /* protected by queue_lock */ |
170 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 170 | #if IS_ENABLED(CONFIG_INPUT) |
171 | struct input_dev *input_dev; | 171 | struct input_dev *input_dev; |
172 | char phys[64]; /* physical device path */ | 172 | char phys[64]; /* physical device path */ |
173 | #endif | 173 | #endif |
@@ -190,7 +190,7 @@ struct gspca_dev { | |||
190 | #define USB_BUF_SZ 64 | 190 | #define USB_BUF_SZ 64 |
191 | __u8 *usb_buf; /* buffer for USB exchanges */ | 191 | __u8 *usb_buf; /* buffer for USB exchanges */ |
192 | struct urb *urb[MAX_NURBS]; | 192 | struct urb *urb[MAX_NURBS]; |
193 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) | 193 | #if IS_ENABLED(CONFIG_INPUT) |
194 | struct urb *int_urb; | 194 | struct urb *int_urb; |
195 | #endif | 195 | #endif |
196 | 196 | ||