On Mon, Sep 23, 2013 at 07:53:11AM +0200, Daniel Mack wrote: > On 23.09.2013 06:09, Vinod Koul wrote: > > On Sun, Sep 22, 2013 at 04:50:04PM +0200, Daniel Mack wrote: > > >> +#ifdef CONFIG_PM_SLEEP > > ahhhh > > > >> +static int cppi41_suspend(struct device *dev) > >> +{ > >> + struct cppi41_dd *cdd = dev_get_drvdata(dev); > >> + > >> + cppi_writel(0, cdd->usbss_mem + USBSS_IRQ_CLEARR); > >> + disable_sched(cdd); > >> + > >> + return 0; > >> +} > >> + > >> +static int cppi41_resume(struct device *dev) > >> +{ > >> + struct cppi41_dd *cdd = dev_get_drvdata(dev); > >> + int i; > >> + > >> + for (i = 0; i < DESCS_AREAS; i++) > >> + cppi_writel(cdd->descs_phys, cdd->qmgr_mem + QMGR_MEMBASE(i)); > >> + > >> + init_sched(cdd); > >> + cppi_writel(USBSS_IRQ_PD_COMP, cdd->usbss_mem + USBSS_IRQ_ENABLER); > >> + > >> + return 0; > >> +} > >> +#endif > >> + > >> +static SIMPLE_DEV_PM_OPS(cppi41_pm_ops, cppi41_suspend, cppi41_resume); > > Here is the macro in pm.h > > [...] > > > Now since you are using the macro there should be no need to wrap ifdef around > > your code, the macro will take care of it. > > Well yes, which is why I put the macro itself *outside* of the #ifdef > block. Without that #ifdef, however, and with CONFIG_PM_SLEEP unset, I get: > > drivers/dma/cppi41.c:1043:12: warning: ‘cppi41_suspend’ defined but not > used [-Wunused-function] > static int cppi41_suspend(struct device *dev) > ^ > drivers/dma/cppi41.c:1053:12: warning: ‘cppi41_resume’ defined but not > used [-Wunused-function] > static int cppi41_resume(struct device *dev) > ^ > > ... which doesn't surprise me much. Or do I still not get your point? And this is what i had expected... I was thinking we should ignore this, but this is better too, so I will try to apply this now ~Vinod -- -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html