From: Lars-Peter Clausen <lars@metafoo.de>
To: James Hogan <james.hogan@imgtec.com>
Cc: Chris Ball <cjb@laptop.org>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: jz4740: simplify use of SIMPLE_DEV_PM_OPS
Date: Mon, 19 Aug 2013 18:45:26 +0200 [thread overview]
Message-ID: <52124BA6.8000905@metafoo.de> (raw)
In-Reply-To: <1376929000-12573-1-git-send-email-james.hogan@imgtec.com>
On 08/19/2013 06:16 PM, James Hogan wrote:
> Commit 5d5c035 (mmc: jz4740: Use SIMPLE_DEV_PM_OPS) converted jz4740_mmc
> to use SIMPLE_DEV_PM_OPS, but it did so within the #ifdef
> CONFIG_PM_SLEEP. SIMPLE_DEV_PM_OPS already handles when CONFIG_PM_SLEEP
> is disabled, so move it out of the ifdef and remove the
> JZ4740_MMC_PM_OPS indirection.
>
> Compile tested with CONFIG_PM_SLEEP enabled and disabled.
>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Chris Ball <cjb@laptop.org>
> Cc: linux-mmc@vger.kernel.org
Nack, the generated code is not the same.
> ---
> drivers/mmc/host/jz4740_mmc.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
> index 0308c9f..28af392 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -898,13 +898,10 @@ static int jz4740_mmc_resume(struct device *dev)
>
> return 0;
> }
> +#endif
>
> static SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend,
> jz4740_mmc_resume);
> -#define JZ4740_MMC_PM_OPS (&jz4740_mmc_pm_ops)
> -#else
> -#define JZ4740_MMC_PM_OPS NULL
> -#endif
>
> static struct platform_driver jz4740_mmc_driver = {
> .probe = jz4740_mmc_probe,
> @@ -912,7 +909,7 @@ static struct platform_driver jz4740_mmc_driver = {
> .driver = {
> .name = "jz4740-mmc",
> .owner = THIS_MODULE,
> - .pm = JZ4740_MMC_PM_OPS,
> + .pm = &jz4740_mmc_pm_ops,
> },
> };
>
>
prev parent reply other threads:[~2013-08-19 16:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 16:16 [PATCH] mmc: jz4740: simplify use of SIMPLE_DEV_PM_OPS James Hogan
2013-08-19 16:45 ` Lars-Peter Clausen [this message]
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=52124BA6.8000905@metafoo.de \
--to=lars@metafoo.de \
--cc=cjb@laptop.org \
--cc=james.hogan@imgtec.com \
--cc=linux-mmc@vger.kernel.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