public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Hou Zhiqiang <b48286@freescale.com>
Cc: Marek Vasut <marex@denx.de>,
	linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org,
	scottwood@freescale.com, Mingkai.Hu@freescale.com,
	dwmw2@infradead.org
Subject: Re: [PATCH v2] mtd: m25p80: Add Power Management support
Date: Fri, 3 Jan 2014 11:07:20 -0800	[thread overview]
Message-ID: <20140103190720.GH5631@ld-irv-0074> (raw)
In-Reply-To: <1386826716-20476-1-git-send-email-b48286@freescale.com>

On Thu, Dec 12, 2013 at 01:38:36PM +0800, Hou Zhiqiang wrote:
> Add PM support using callback function suspend and resume in
> .driver.pm of spi_driver.
> 
> Signed-off-by: Hou Zhiqiang <b48286@freescale.com>
> ---
> v2:
>  - Replace .driver.suspend and .driver.resume with .driver.pm
>  - Use CONFIG_PM_SLEEP instead of CONFIG_PM

Just noticed v2... My v1 comments still apply.

> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -1128,11 +1130,46 @@ static int m25p_remove(struct spi_device *spi)
...
> +static const struct dev_pm_ops m25p_pm = {
> +	SET_SYSTEM_SLEEP_PM_OPS(m25p_suspend, m25p_resume)
> +};

This could just be:

static SIMPLE_DEV_PM_OPS(m25p_pm_ops, m25p_suspend, m25p_resume);

>  
>  static struct spi_driver m25p80_driver = {
>  	.driver = {
>  		.name	= "m25p80",
>  		.owner	= THIS_MODULE,
> +		.pm	= &m25p_pm,
>  	},
>  	.id_table	= m25p_ids,
>  	.probe	= m25p_probe,

Brian

      reply	other threads:[~2014-01-03 19:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12  5:38 [PATCH v2] mtd: m25p80: Add Power Management support Hou Zhiqiang
2014-01-03 19:07 ` Brian Norris [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=20140103190720.GH5631@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=Mingkai.Hu@freescale.com \
    --cc=b48286@freescale.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=marex@denx.de \
    --cc=scottwood@freescale.com \
    /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