From patchwork Tue Mar 30 17:32:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 89345 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2UHXduK031963 for ; Tue, 30 Mar 2010 17:33:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754404Ab0C3RdQ (ORCPT ); Tue, 30 Mar 2010 13:33:16 -0400 Received: from rcsinet11.oracle.com ([148.87.113.123]:57936 "EHLO rcsinet11.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752051Ab0C3RdO (ORCPT ); Tue, 30 Mar 2010 13:33:14 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o2UHX7n6006592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Mar 2010 17:33:08 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o2UHDgto011414; Tue, 30 Mar 2010 17:33:00 GMT Received: from abhmt019.oracle.com by acsmt354.oracle.com with ESMTP id 124264541269970325; Tue, 30 Mar 2010 10:32:05 -0700 Received: from chimera.site (/71.245.98.113) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 30 Mar 2010 10:32:05 -0700 Message-ID: <4BB23594.1090506@oracle.com> Date: Tue, 30 Mar 2010 10:32:04 -0700 From: Randy Dunlap Organization: Oracle Linux Engineering User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-3.fc11 Thunderbird/3.0 MIME-Version: 1.0 To: Stephen Rothwell CC: linux-next@vger.kernel.org, LKML , Jean-Francois Moine , Linux Media Mailing List Subject: [PATCH -next] gspca: fix build for INPUT=m or INPUT=n References: <20100330191834.f2009292.sfr@canb.auug.org.au> In-Reply-To: <20100330191834.f2009292.sfr@canb.auug.org.au> X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4BB235D1.00B4:SCFMA4539814,ss=1,fgs=0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 30 Mar 2010 17:33:40 +0000 (UTC) --- linux-next-20100330.orig/drivers/media/video/gspca/gspca.c +++ linux-next-20100330/drivers/media/video/gspca/gspca.c @@ -40,7 +40,7 @@ #include "gspca.h" -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) #include #include #endif @@ -115,7 +115,7 @@ static const struct vm_operations_struct /* * Input and interrupt endpoint handling functions */ -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) static void int_irq(struct urb *urb) { struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; @@ -279,6 +279,19 @@ static void gspca_input_destroy_urb(stru 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 /* get the current input frame buffer */ @@ -2310,7 +2323,7 @@ int gspca_dev_probe(struct usb_interface return 0; out: -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) if (gspca_dev->input_dev) input_unregister_device(gspca_dev->input_dev); #endif @@ -2329,7 +2342,7 @@ EXPORT_SYMBOL(gspca_dev_probe); void gspca_disconnect(struct usb_interface *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; #endif @@ -2343,7 +2356,7 @@ void gspca_disconnect(struct usb_interfa wake_up_interruptible(&gspca_dev->wq); } -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) gspca_input_destroy_urb(gspca_dev); input_dev = gspca_dev->input_dev; if (input_dev) { --- linux-next-20100330.orig/drivers/media/video/gspca/gspca.h +++ linux-next-20100330/drivers/media/video/gspca/gspca.h @@ -130,7 +130,7 @@ struct sd_desc { cam_reg_op get_register; #endif cam_ident_op get_chip_ident; -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) 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 */ @@ -158,7 +158,7 @@ struct gspca_dev { struct module *module; /* subdriver handling the device */ struct usb_device *dev; struct file *capt_file; /* file doing video capture */ -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) struct input_dev *input_dev; char phys[64]; /* physical device path */ #endif @@ -171,7 +171,7 @@ struct gspca_dev { #define USB_BUF_SZ 64 __u8 *usb_buf; /* buffer for USB exchanges */ struct urb *urb[MAX_NURBS]; -#ifdef CONFIG_INPUT +#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) struct urb *int_urb; #endif