public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	linux-kernel@vger.kernel.org,
	spear-devel <spear-devel@list.st.com>,
	viresh.kumar@linaro.org, Felipe Balbi <balbi@ti.com>
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	[thread overview]
Message-ID: <4155522.4XZWB6Jmjq@wuerfel> (raw)
In-Reply-To: <1370349382-20914-4-git-send-email-andriy.shevchenko@linux.intel.com>

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

  reply	other threads:[~2013-06-04 13:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 12:36 [PATCH v1 0/4] dw_dmac: move to own folder and split Andy Shevchenko
2013-06-04 12:36 ` [PATCH v1 1/4] dw_dmac: don't check resource with devm_ioremap_resource Andy Shevchenko
2013-06-04 12:36 ` [PATCH v1 2/4] dma: move dw_dmac driver to an own directory Andy Shevchenko
2013-06-04 12:36 ` [PATCH v1 3/4] dma: dw: split driver to library part and platform code Andy Shevchenko
2013-06-04 13:00   ` Arnd Bergmann [this message]
2013-06-05  8:45   ` Viresh Kumar
2013-06-04 12:36 ` [PATCH v1 4/4] dma: dw: add PCI part of the driver Andy Shevchenko
2013-06-05  9:41   ` Viresh Kumar
2013-06-04 13:01 ` [PATCH v1 0/4] dw_dmac: move to own folder and split Arnd Bergmann
2013-06-04 13:43   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4155522.4XZWB6Jmjq@wuerfel \
    --to=arnd@arndb.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox