On Fri, 30 May 2014, Dan Williams wrote: > >> --- a/drivers/usb/core/driver.c > >> +++ b/drivers/usb/core/driver.c > >> @@ -29,7 +29,7 @@ > >> #include <linux/usb/quirks.h> > >> #include <linux/usb/hcd.h> > >> > >> -#include "usb.h" > >> +#include "hub.h" > > > > Why on earth would something like this be needed? You didn't remove > > anything from usb.h. > > > > All the changes in this patch should be internal to the hub driver. > > Other .c files should not be involved. > > usb_unlocked_disable_lpm() is defined in hub_pm.c and called from > hub.c driver.c and message.c. I was moving fast and just centralized > all declarations hub/hub_pm.c defined routines in hub.h. Would you > rather have one-off definitions in usb.h? It's best if the existing declarations in include/linux/usb.h are left alone. > >> --- a/drivers/usb/core/usb.h > >> +++ b/drivers/usb/core/usb.h > >> @@ -111,6 +111,11 @@ static inline int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable) > >> { > >> return 0; > >> } > >> + > >> +static inline int usb_remote_wakeup(struct usb_device *dev) > >> +{ > >> + return 0; > >> +} > >> #endif > > > > It seems strange for this to be here. Why not move all the > > declarations of usb_remote_wakeup into hub.h? > > It seems I randomly made the opposite choice here, but the same > question still stands about one-off hub/hub_pm.c declarations in > usb.h. In general, I think drivers/usb/core/hub.h should include things that are used only in hub.c, hub_pm.c, and port.c. Things used in other source files should go in core/usb.h. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html