On Fri, 3 Aug 2012, Alan Stern wrote:

> > +   void (*power)(struct device *dev, int in_pm, int enable);
> 
> I don't like having these two separate arguments.  Having multiple 
> function pointers would be better:
> 
>       void (*power_off)(struct platform_device *pdev);
>                       /* Turn off all power and clocks */
>       void (*power_suspend)(struct platform_device *pdev);
>                       /* Turn on only VBUS suspend power and hotplug
>                               detection, turn off everything else */
>       void (*power_on)(struct platform_device *pdev);
>                       /* Turn on all power and clocks */

Come to think of it, it would be better for the power_on callback to
return an integer error code that you could test.  The other callbacks
might not matter so much.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to