Message ID | 1379860999-7106-3-git-send-email-zonque@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello. On 22-09-2013 18:43, Daniel Mack wrote: > This makes omap2430_pm_ops const and will stub the struct out in case > CONFIG_PM_SLEEP is not set. > Signed-off-by: Daniel Mack <zonque@gmail.com> > --- > drivers/usb/musb/omap2430.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c > index 59d2245..be42460 100644 > --- a/drivers/usb/musb/omap2430.c > +++ b/drivers/usb/musb/omap2430.c > @@ -659,17 +659,12 @@ static int omap2430_runtime_resume(struct device *dev) > > return 0; > } > - > -static struct dev_pm_ops omap2430_pm_ops = { > - .runtime_suspend = omap2430_runtime_suspend, > - .runtime_resume = omap2430_runtime_resume, > -}; > - > -#define DEV_PM_OPS (&omap2430_pm_ops) > -#else > -#define DEV_PM_OPS NULL > #endif > > +static SIMPLE_DEV_PM_OPS(omap2430_pm_ops, > + omap2430_runtime_suspend, > + omap2430_runtime_resume); No, SIMPLE_DEV_PM_OPS() won't do here, it's runtime PM, didn't you see? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 22.09.2013 16:59, Sergei Shtylyov wrote: > On 22-09-2013 18:43, Daniel Mack wrote: > >> This makes omap2430_pm_ops const and will stub the struct out in case >> CONFIG_PM_SLEEP is not set. > >> Signed-off-by: Daniel Mack <zonque@gmail.com> >> --- >> drivers/usb/musb/omap2430.c | 15 +++++---------- >> 1 file changed, 5 insertions(+), 10 deletions(-) > >> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c >> index 59d2245..be42460 100644 >> --- a/drivers/usb/musb/omap2430.c >> +++ b/drivers/usb/musb/omap2430.c >> @@ -659,17 +659,12 @@ static int omap2430_runtime_resume(struct device *dev) >> >> return 0; >> } >> - >> -static struct dev_pm_ops omap2430_pm_ops = { >> - .runtime_suspend = omap2430_runtime_suspend, >> - .runtime_resume = omap2430_runtime_resume, >> -}; >> - >> -#define DEV_PM_OPS (&omap2430_pm_ops) >> -#else >> -#define DEV_PM_OPS NULL >> #endif >> >> +static SIMPLE_DEV_PM_OPS(omap2430_pm_ops, >> + omap2430_runtime_suspend, >> + omap2430_runtime_resume); > > No, SIMPLE_DEV_PM_OPS() won't do here, it's runtime PM, didn't you see? Eh, you're right, sorry. Whoever applies this series, just drop that one patch. The rest of this series is not affected. Sergei, thanks for the review again :) Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 59d2245..be42460 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -659,17 +659,12 @@ static int omap2430_runtime_resume(struct device *dev) return 0; } - -static struct dev_pm_ops omap2430_pm_ops = { - .runtime_suspend = omap2430_runtime_suspend, - .runtime_resume = omap2430_runtime_resume, -}; - -#define DEV_PM_OPS (&omap2430_pm_ops) -#else -#define DEV_PM_OPS NULL #endif +static SIMPLE_DEV_PM_OPS(omap2430_pm_ops, + omap2430_runtime_suspend, + omap2430_runtime_resume); + #ifdef CONFIG_OF static const struct of_device_id omap2430_id_table[] = { { @@ -688,7 +683,7 @@ static struct platform_driver omap2430_driver = { .remove = omap2430_remove, .driver = { .name = "musb-omap2430", - .pm = DEV_PM_OPS, + .pm = &omap2430_pm_ops, .of_match_table = of_match_ptr(omap2430_id_table), }, };
This makes omap2430_pm_ops const and will stub the struct out in case CONFIG_PM_SLEEP is not set. Signed-off-by: Daniel Mack <zonque@gmail.com> --- drivers/usb/musb/omap2430.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)