Re: [PATCH 16/25] USB Client Maximum Power Consumption function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +/* 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?

If the power layer asks about the power status before the USB
controller is up and running.

Which begs another question about locking I shall review.
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux