From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: Re: [PATCH -next] cpc-usb: fix PROC_FS dependency Date: Fri, 22 May 2009 09:36:37 -0700 Message-ID: <4A16D495.9040301@xenotime.net> References: <20090522185110.3f95b03e.sfr@canb.auug.org.au> <4A16D325.4030202@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from xenotime.net ([72.52.64.118]:35252 "HELO xenotime.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751688AbZEVQeC (ORCPT ); Fri, 22 May 2009 12:34:02 -0400 Received: from ::ffff:71.182.83.218 ([71.182.83.218]) by xenotime.net for ; Fri, 22 May 2009 09:34:03 -0700 In-Reply-To: <4A16D325.4030202@oracle.com> Sender: linux-next-owner@vger.kernel.org List-ID: To: LKML Cc: Stephen Rothwell , linux-next@vger.kernel.org, Greg KH , Sebastian Haas Randy Dunlap wrote: > From: Randy Dunlap > > The proper way to check for and enforce a kconfig symbol > dependency is via Kconfig files, not by using #error in > a source file followed by 9 other compile errors. > > Signed-off-by: Randy Dunlap > Cc: Sebastian Haas > --- > drivers/staging/cpc-usb/Kconfig | 2 +- > drivers/staging/cpc-usb/cpc-usb_drv.c | 10 +--------- > 2 files changed, 2 insertions(+), 10 deletions(-) > > --- linux-next-20090522.orig/drivers/staging/cpc-usb/cpc-usb_drv.c > +++ linux-next-20090522/drivers/staging/cpc-usb/cpc-usb_drv.c > @@ -27,12 +27,8 @@ > #include > #include > #include > - > #include > - > -#ifdef CONFIG_PROC_FS > -# include > -#endif > +#include > > #include "cpc.h" > > @@ -57,10 +53,6 @@ MODULE_LICENSE("GPL v2"); > #define USB_CPCUSB_M16C_PRODUCT_ID 0x0888 > #define USB_CPCUSB_LPC2119_PRODUCT_ID 0x0444 > > -#ifndef CONFIG_PROC_FS > -#error "PROCFS needed" > -#endif > - > #define CPC_USB_PROC_DIR CPC_PROC_DIR "cpc-usb" > > static struct proc_dir_entry *procDir; > --- linux-next-20090522.orig/drivers/staging/cpc-usb/Kconfig > +++ linux-next-20090522/drivers/staging/cpc-usb/Kconfig > @@ -1,4 +1,4 @@ > config USB_CPC > tristate "CPC CAN USB driver" > - depends on USB > + depends on USB && PROC_FS > default n BTW, I'm surprised that there is no NET or CAN dependency here. -- ~Randy LPC 2009, Sept. 23-25, Portland, Oregon http://linuxplumbersconf.org/2009/