[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4155522.4XZWB6Jmjq@wuerfel>
Date: Tue, 04 Jun 2013 15:00:43 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Vinod Koul <vinod.koul@...el.com>, linux-kernel@...r.kernel.org,
spear-devel <spear-devel@...t.st.com>, viresh.kumar@...aro.org,
Felipe Balbi <balbi@...com>
Subject: Re: [PATCH v1 3/4] dma: dw: split driver to library part and platform code
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@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists