public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public•gmane.org>
To: Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public•gmane.org>
Cc: Alan Stern
	<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public•gmane.org>,
	Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public•gmane.org>,
	linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
	Ian Abbott <abbotti-GUHe90Wt2aFaa/9Udqfwiw@public•gmane.org>,
	Frank Mori Hess
	<fmhess-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public•gmane.org>,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public•gmane.org,
	USB list <linux-usb-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>
Subject: Re: [PATCH -next] usb: add usb.h stubs for CONFIG_USB not enabled
Date: Mon, 11 Jun 2012 16:07:23 -0700	[thread overview]
Message-ID: <20120611230723.GA25565@kroah.com> (raw)
In-Reply-To: <4FB7C0E4.4000008-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>

On Sat, May 19, 2012 at 08:48:52AM -0700, Randy Dunlap wrote:
> On 05/19/2012 07:30 AM, Alan Stern wrote:
> 
> > On Fri, 18 May 2012, Randy Dunlap wrote:
> > 
> >> From: Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public•gmane.org>
> >>
> >> 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 <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public•gmane.org>
> >> ---
> >> 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.
> 
> 
> Yeah, my first patch (not on linux-usb list) to staging/comedi/drivers.c
> just surrounded the usb helper functions with IS_ENABLED(CONFIG_USB).
> I'm fine with that patch, but Greg said that he wanted stubs...

In looking at this a bit more, I think we should go back to the "fix up
comedi" patch, as it is less intrusive, and as we haven't needed these
stubs for the past 10+ years, we probably shouldn't add them now :)

So, do you happen to have that old patch around, or do you want me to
make those changes?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-06-11 23:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  8:49 linux-next: Tree for May 18 Stephen Rothwell
2012-05-19  0:46 ` [PATCH -next] comedi: fix build when USB is not enabled Randy Dunlap
2012-05-19  0:50   ` Greg Kroah-Hartman
2012-05-19  0:51     ` Randy Dunlap
2012-05-19  2:04     ` [PATCH -next] usb: add usb.h stubs for CONFIG_USB " Randy Dunlap
     [not found]       ` <4FB6FFBF.6000509-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2012-05-19 14:16         ` Sergei Shtylyov
2012-05-19 15:45           ` Randy Dunlap
2012-05-19 16:12             ` Greg Kroah-Hartman
2012-05-19 16:31               ` [PATCH -next v2] " Randy Dunlap
2012-05-21 16:48                 ` H Hartley Sweeten
2012-05-19 14:30       ` [PATCH -next] " Alan Stern
2012-05-19 15:48         ` Randy Dunlap
     [not found]           ` <4FB7C0E4.4000008-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2012-06-11 23:07             ` Greg Kroah-Hartman [this message]
2012-06-11 23:35               ` [PATCH] staging/comedi: fix build for USB " Randy Dunlap
2012-05-19  1:02 ` linux-next: Tree for May 18 (drm drivers and vgacon) Randy Dunlap
2012-05-19 15:40   ` Dave Airlie
2012-05-19  2:16 ` linux-next: Tree for May 18 (edac) Randy Dunlap
2012-05-19 12:03   ` Mauro Carvalho Chehab
2012-05-19 15:50     ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120611230723.GA25565@kroah.com \
    --to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public$(echo .)gmane.org \
    --cc=abbotti-GUHe90Wt2aFaa/9Udqfwiw@public$(echo .)gmane.org \
    --cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public$(echo .)gmane.org \
    --cc=fmhess-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public$(echo .)gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public$(echo .)gmane.org \
    --cc=sfr-3FnU+UHB4dNDw9hX6IcOSA@public$(echo .)gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox