On Fri, Dec 20, 2013 at 07:19:31PM -0200, Fabio Estevam wrote: > On Fri, Dec 20, 2013 at 7:05 PM, Felipe Balbi <balbi@xxxxxx> wrote: > > by using SET_SYSTEM_SLEEP_PM_OPS, we will make > > sure that we don't use undefined functions. > > > > Signed-off-by: Felipe Balbi <balbi@xxxxxx> > > You could optimize this a bit further: > > --- a/drivers/usb/phy/phy-am335x.c > +++ b/drivers/usb/phy/phy-am335x.c > @@ -122,16 +122,9 @@ static int am335x_phy_resume(struct device *dev) > > return 0; > } > -#define DEV_PM_OPS (&am335x_pm_ops) > -#else > -#define DEV_PM_OPS NULL > #endif > > - > -static const struct dev_pm_ops am335x_pm_ops = { > - .suspend = am335x_phy_suspend, > - .resume = am335x_phy_resume, > -}; > +static SIMPLE_DEV_PM_OPS(am335x_pm_ops, am335x_phy_suspend, am335x_phy_resume); I rather keep it the other way, we have plans to add runtime pm soonish ;-) Thanks though :-) -- balbi
Attachment:
signature.asc
Description: Digital signature