Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760295Ab2ESOaD (ORCPT ); Sat, 19 May 2012 10:30:03 -0400 Received: from netrider.rowland.org ([192.131.102.5]:37959 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754624Ab2ESOaB (ORCPT ); Sat, 19 May 2012 10:30:01 -0400 Date: Sat, 19 May 2012 10:30:00 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Randy Dunlap cc: Greg Kroah-Hartman , Stephen Rothwell , , LKML , Ian Abbott , Frank Mori Hess , , USB list Subject: Re: [PATCH -next] usb: add usb.h stubs for CONFIG_USB not enabled In-Reply-To: <4FB6FFBF.6000509@xenotime.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1244 Lines: 32 On Fri, 18 May 2012, Randy Dunlap wrote: > From: Randy Dunlap > > Add stubs for some usb core functions when CONFIG_USB > is not enabled. This fixes these comedi build errors: > > ERROR: "usb_deregister" [drivers/staging/comedi/comedi.ko] undefined! > ERROR: "usb_register_driver" [drivers/staging/comedi/comedi.ko] undefined! > > Signed-off-by: Randy Dunlap > --- > I am only adding the stubs that are needed for comedi to build. > I expect that more stubs will be needed as more build errors are > found. It seems to me that linux/usb.h might need more (major) > moving of lines to support more stubs in the future. This doesn't seem like the right thing to do. If a driver needs to register with the USB core then that driver should depend on CONFIG_USB. On the other hand, if the driver is capable of being built without USB support then it should use the necessary preprocessor tests to protect calls to any USB routines. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/