From patchwork Sat Jan 19 16:33:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 2006921 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B20A93FE1F for ; Sat, 19 Jan 2013 16:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751941Ab3ASQeK (ORCPT ); Sat, 19 Jan 2013 11:34:10 -0500 Received: from mail-qc0-f174.google.com ([209.85.216.174]:49066 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751921Ab3ASQeI (ORCPT ); Sat, 19 Jan 2013 11:34:08 -0500 Received: by mail-qc0-f174.google.com with SMTP id z24so191765qcq.33 for ; Sat, 19 Jan 2013 08:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=9UPkVPAl2vaAsqS/aJRyMunVcT6pvfrPiZqT0Y/Y69o=; b=cd4k3X4JWFDHRlbVmz0i546bIkGG5qggYk/NWj628Z+h2fm6qnfBc65vDFaQFB0wKm VVTXTv/8tyhGxebEJZIWAE2ObirG2ZE82sRR+BpxrfZCXX9kw+AbBzgdYho4hBc2d0BO MafBVDsMn7XHpPd9ihWvxi+L+xommvNoEEZzAjlO98++gAkXwdEusCD6kr5phlsvEi5j tBhBmVu1+bgiXNJry/DytpMv/pbLr8oLynULmNVEVs9oTqhannTJOQqesHoXCAzKoOm/ 8KX9ZEpP1StHJaIUUKFFS39GmiZFc152xuo8eqdPzeqVPy3QMlm8i75Sf+w5wtsaTyV3 nfLg== X-Received: by 10.224.185.141 with SMTP id co13mr13544699qab.33.1358613247757; Sat, 19 Jan 2013 08:34:07 -0800 (PST) Received: from ace.home.cabure.org (200-140-13-6.bsace705.dsl.brasiltelecom.net.br. [200.140.13.6]) by mx.google.com with ESMTPS id f7sm5410451qap.13.2013.01.19.08.34.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 19 Jan 2013 08:34:07 -0800 (PST) From: Peter Senna Tschudin To: hdegoede@redhat.com Cc: mchehab@redhat.com, linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org, Peter Senna Tschudin Subject: [PATCH 07/24] use IS_ENABLED() macro Date: Sat, 19 Jan 2013 14:33:10 -0200 Message-Id: <1358613206-4274-7-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1358613206-4274-1-git-send-email-peter.senna@gmail.com> References: <1358613206-4274-1-git-send-email-peter.senna@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Peter Senna Tschudin --- 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 #include #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