Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH v1 3/4] dma: dw: split driver to library part and platform code | Date | Tue, 04 Jun 2013 15:00:43 +0200 |
| |
On Tuesday 04 June 2013 15:36:21 Andy Shevchenko wrote: > To simplify the driver development let's split driver to library and platform > code parts. It helps us to add PCI driver in future. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/dma/Makefile | 2 +- > drivers/dma/dw/Kconfig | 8 +- > drivers/dma/dw/Makefile | 6 +- > drivers/dma/dw/{dw_dmac.c => core.c} | 309 ++++-------------------------- > drivers/dma/dw/internal.h | 74 +++++++ > drivers/dma/dw/platform.c | 308 +++++++++++++++++++++++++++++ > drivers/dma/dw/{dw_dmac_regs.h => regs.h} | 1 +
Looks good to me, just one issue I found:
> +#ifdef CONFIG_PM_SLEEP > + > +int dw_dma_suspend_noirq(struct dw_dma_chip *chip); > +int dw_dma_resume_noirq(struct dw_dma_chip *chip); > + > +#else /* !CONFIG_PM_SLEEP */ > + > +#define dw_dma_suspend_noirq NULL > +#define dw_dma_resume_noirq NULL > + > +#endif /* !CONFIG_PM_SLEEP */
This won't work ...
> +static int dw_suspend_noirq(struct device *dev) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct dw_dma_chip *chip = platform_get_drvdata(pdev); > + > + return dw_dma_suspend_noirq(chip); > +} > + > +static int dw_resume_noirq(struct device *dev) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct dw_dma_chip *chip = platform_get_drvdata(pdev); > + > + return dw_dma_resume_noirq(chip); > +}
when you try to call NULL as a function.
Please try to get it to build with CONFIG_PM_SLEEP disabled.
Arnd
| |