On Wed, Aug 04, 2010 at 10:52:55PM +0100, Alan Cox wrote: > From: JiebingLi <jiebing.li@xxxxxxxxx> > > Get Maximum power consumption function in USB clent driver. This is used by > the power manager. > > Signed-off-by: JiebingLi <jiebing.li@xxxxxxxxx> > Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx> > --- > > drivers/usb/gadget/langwell_udc.c | 49 +++++++++++++++++++++++++++++++++++++ > include/linux/usb/langwell_udc.h | 6 +++++ > 2 files changed, 55 insertions(+), 0 deletions(-) > > > diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c > index 3b3e5ba..6251c3c 100644 > --- a/drivers/usb/gadget/langwell_udc.c > +++ b/drivers/usb/gadget/langwell_udc.c > @@ -1974,6 +1974,55 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) > EXPORT_SYMBOL(usb_gadget_unregister_driver); > > > +/* gets the maximum power consumption */ > +int langwell_udc_maxpower(int *mA) > +{ > + struct langwell_udc *dev = the_controller; > + u32 usbmode, portsc1, usbcmd; > + > + /* fatal error */ > + if (!dev) { > + *mA = 0; > + return -EINVAL; > + } How could this ever happen? thanks, greg k-h -- 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