Netdev List
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Fabio Estevam <fabio.estevam@freescale.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] fec: Use SIMPLE_DEV_PM_OPS
Date: Tue, 16 Apr 2013 18:32:00 +0400	[thread overview]
Message-ID: <516D60E0.6000107@cogentembedded.com> (raw)
In-Reply-To: <1366120731-31427-1-git-send-email-fabio.estevam@freescale.com>

Hello.

On 16-04-2013 17:58, Fabio Estevam wrote:

> Using SIMPLE_DEV_PM_OPS can make the code smaller and simpler.

> Also change CONFIG_PM to CONFIG_PM_SLEEP.

> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>   drivers/net/ethernet/freescale/fec_main.c |   20 +++++++-------------
>   1 file changed, 7 insertions(+), 13 deletions(-)

> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 806a56d..2e8bb58 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
[...]
> @@ -1946,23 +1946,17 @@ fec_resume(struct device *dev)
>   	return 0;
>   }
>
> -static const struct dev_pm_ops fec_pm_ops = {
> -	.suspend	= fec_suspend,
> -	.resume		= fec_resume,
> -	.freeze		= fec_suspend,
> -	.thaw		= fec_resume,
> -	.poweroff	= fec_suspend,
> -	.restore	= fec_resume,
> -};
> -#endif
> +static SIMPLE_DEV_PM_OPS(fec_pm_ops, fec_suspend, fec_resume);
> +#define FEC_PM_OPS (&fec_pm_ops)

    Nit: parens are useless here.

WBR, Sergei

  reply	other threads:[~2013-04-16 14:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 13:58 [PATCH] fec: Use SIMPLE_DEV_PM_OPS Fabio Estevam
2013-04-16 14:32 ` Sergei Shtylyov [this message]
2013-04-16 15:22   ` Fabio Estevam
2013-04-16 17:11     ` Sergei Shtylyov
2013-04-16 17:49       ` Joe Perches
2013-04-16 17:51         ` Fabio Estevam
2013-04-16 21:25         ` Francois Romieu

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=516D60E0.6000107@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=netdev@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