From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH -next] comedi: fix build when USB is not enabled Date: Fri, 18 May 2012 17:50:31 -0700 Message-ID: <20120519005031.GA27613@kroah.com> References: <20120518184943.2c762e8441e53ea24748d1b8@canb.auug.org.au> <4FB6ED55.6090805@xenotime.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:61526 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965436Ab2ESAue (ORCPT ); Fri, 18 May 2012 20:50:34 -0400 Received: by dady13 with SMTP id y13so4478835dad.19 for ; Fri, 18 May 2012 17:50:34 -0700 (PDT) Content-Disposition: inline In-Reply-To: <4FB6ED55.6090805@xenotime.net> Sender: linux-next-owner@vger.kernel.org List-ID: To: Randy Dunlap Cc: Stephen Rothwell , linux-next@vger.kernel.org, LKML , Ian Abbott , Frank Mori Hess , devel@driverdev.osuosl.org On Fri, May 18, 2012 at 05:46:13PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Calls to optional subsystems cannot be made indiscriminately. > Enclose all of the usb helper functions inside > #if IS_ENABLED(CONFIG_USB) > to fix these build errors. > > (The pci helper functions are OK since there are stubs in > linux/pci.h for the called functions when PCI is not enabled. > Possibly the same could be done for the called USB functions.) > > ERROR: "usb_deregister" [drivers/staging/comedi/comedi.ko] undefined! > ERROR: "usb_register_driver" [drivers/staging/comedi/comedi.ko] undefined! I would rather stub these out in usb.h instead, care to make a patch for that? thanks, greg k-h