[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516D60E0.6000107@cogentembedded.com>
Date: Tue, 16 Apr 2013 18:32:00 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Fabio Estevam <fabio.estevam@...escale.com>
CC: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] fec: Use SIMPLE_DEV_PM_OPS
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@...escale.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists