lkml.org 
[lkml]   [2013]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v1 3/4] dma: dw: split driver to library part and platform code
Date
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


\
 
 \ /
  Last update: 2013-06-04 15:42    [W:0.082 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site