From: Peter Senna Tschudin <peter.senna@gmail.com>
To: hdegoede@redhat.com
Cc: mchehab@redhat.com, linux-media@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Peter Senna Tschudin <peter.senna@gmail.com>
Subject: [PATCH 07/24] use IS_ENABLED() macro
Date: Sat, 19 Jan 2013 14:33:10 -0200 [thread overview]
Message-ID: <1358613206-4274-7-git-send-email-peter.senna@gmail.com> (raw)
In-Reply-To: <1358613206-4274-1-git-send-email-peter.senna@gmail.com>
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>
---
drivers/media/usb/gspca/gspca.c | 10 +++++-----
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 e0a431b..3564bdb 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -44,7 +44,7 @@
#include "gspca.h"
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
#include <linux/input.h>
#include <linux/usb/input.h>
#endif
@@ -118,7 +118,7 @@ static const struct vm_operations_struct gspca_vm_ops = {
/*
* 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)
{
struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
@@ -2303,7 +2303,7 @@ int gspca_dev_probe2(struct usb_interface *intf,
return 0;
out:
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
if (gspca_dev->input_dev)
input_unregister_device(gspca_dev->input_dev);
#endif
@@ -2348,7 +2348,7 @@ EXPORT_SYMBOL(gspca_dev_probe);
void gspca_disconnect(struct usb_interface *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;
#endif
@@ -2360,7 +2360,7 @@ void gspca_disconnect(struct usb_interface *intf)
gspca_dev->present = 0;
destroy_urbs(gspca_dev);
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
gspca_input_destroy_urb(gspca_dev);
input_dev = gspca_dev->input_dev;
if (input_dev) {
diff --git a/drivers/media/usb/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h
index 352317d..5559932 100644
--- a/drivers/media/usb/gspca/gspca.h
+++ b/drivers/media/usb/gspca/gspca.h
@@ -138,7 +138,7 @@ struct sd_desc {
cam_reg_op get_register;
#endif
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;
/* other_input makes the gspca core create gspca_dev->input even when
int_pkt_scan is NULL, for cams with non interrupt driven buttons */
@@ -167,7 +167,7 @@ struct gspca_dev {
struct usb_device *dev;
struct file *capt_file; /* file doing video capture */
/* protected by queue_lock */
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
struct input_dev *input_dev;
char phys[64]; /* physical device path */
#endif
@@ -190,7 +190,7 @@ struct gspca_dev {
#define USB_BUF_SZ 64
__u8 *usb_buf; /* buffer for USB exchanges */
struct urb *urb[MAX_NURBS];
-#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
+#if IS_ENABLED(CONFIG_INPUT)
struct urb *int_urb;
#endif
--
1.7.11.7
next prev parent reply other threads:[~2013-01-19 16:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-19 16:33 [PATCH 01/24] use IS_ENABLED() macro Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 02/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 03/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 04/24] " Peter Senna Tschudin
2013-01-22 14:20 ` Jonathan Corbet
2013-01-19 16:33 ` [PATCH 05/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 06/24] " Peter Senna Tschudin
2013-01-19 16:33 ` Peter Senna Tschudin [this message]
2013-01-19 16:33 ` [PATCH 08/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 09/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 10/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 11/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 12/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 13/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 14/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 16/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 17/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 18/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 19/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 20/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 21/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 22/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 23/24] " Peter Senna Tschudin
2013-01-19 16:33 ` [PATCH 24/24] " Peter Senna Tschudin
2013-01-19 17:49 ` [PATCH 01/24] " Nikola Pajkovsky
2013-01-21 12:47 ` Hans de Goede
2013-01-21 12:51 ` Peter Senna Tschudin
2013-01-22 9:52 ` Hans de Goede
2013-01-24 20:45 ` Mauro Carvalho Chehab
2013-01-21 22:24 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358613206-4274-7-git-send-email-peter.senna@gmail.com \
--to=peter.senna@gmail.com \
--cc=hdegoede@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).