[lkml]   [2011]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCHv5 1/4] usb: Provide usb_speed_string() function
    On Fri, 26 Aug 2011, Greg KH wrote:

    > > > No, this should be in include/linux/usb.h, not ch9.h.
    > >
    > > There's a reason for both of these things. The usb_speed_string
    > > routine, like the other stuff in ch9.h, is meant to be used with both
    > > the host-side and device-side USB stacks.
    > Ok, the __KERNEL__ stuff threw me off, those should not be in the patch
    > as they are not needed, so it's ok to keep it here, sorry.

    The __KERNEL__ guard is needed there because ch9.h is one of the files
    exported to /usr/include/linux.

    > > This makes deciding where to put it kind of difficult. The two stacks
    > > are pretty much independent; one might be built into the kernel while
    > > the other is built as modules. The easiest solution that will always
    > > work is to put common.c into the main kernel.
    > A module, if the USB Host core is a module, and a module if the USB
    > gadge core is a module, would be best if at all possible. I'm a bit
    > leery of adding stuff to be built into the kernel no matter how the user
    > decided to configure USB.
    > Is this possible with the Kbuild system somehow?

    I don't know. Michal, can you look into this? What we want is:

    common.o gets included in the main kernel if either CONFIG_USB
    or CONFIG_USB_GADGET is set to Y.

    Otherwise, if either symbol is set to M then common.o gets
    built into its own little module. Perhaps some other stuff
    could get put in there too, though at the moment I can't
    think of anything.

    Alan Stern

     \ /
      Last update: 2011-08-26 20:51    [W:0.021 / U:31.364 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site