netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Fabio Estevam <fabio.estevam@freescale.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, joe@perches.com
Subject: Re: [PATCH 5/5] ks8851: Remove unneeded PM_OPS definitions
Date: Tue, 16 Apr 2013 22:29:37 +0200	[thread overview]
Message-ID: <516DB4B1.9050602@metafoo.de> (raw)
In-Reply-To: <1366140511-3836-5-git-send-email-fabio.estevam@freescale.com>

On 04/16/2013 09:28 PM, Fabio Estevam wrote:
> SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
> need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
> 
> Remove the unneeded definitions.
> 
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

yea, but now you have the dev_pm_ops struct, even if pm is disabled.

- Lars

> ---
>  drivers/net/ethernet/micrel/ks8851.c |    8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
> index da64960..727b546a 100644
> --- a/drivers/net/ethernet/micrel/ks8851.c
> +++ b/drivers/net/ethernet/micrel/ks8851.c
> @@ -1391,13 +1391,9 @@ static int ks8851_resume(struct device *dev)
>  
>  	return 0;
>  }
> +#endif
>  
>  static SIMPLE_DEV_PM_OPS(ks8851_pm_ops, ks8851_suspend, ks8851_resume);
> -#define KS8851_PM_OPS (&ks8851_pm_ops)
> -
> -#else
> -#define KS8851_PM_OPS NULL
> -#endif
>  
>  static int ks8851_probe(struct spi_device *spi)
>  {
> @@ -1536,7 +1532,7 @@ static struct spi_driver ks8851_driver = {
>  	.driver = {
>  		.name = "ks8851",
>  		.owner = THIS_MODULE,
> -		.pm = KS8851_PM_OPS,
> +		.pm = &ks8851_pm_ops,
>  	},
>  	.probe = ks8851_probe,
>  	.remove = ks8851_remove,

  reply	other threads:[~2013-04-16 20:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
2013-04-16 19:28 ` [PATCH 2/5] atl1: " Fabio Estevam
2013-04-16 19:28 ` [PATCH 3/5] tg3: " Fabio Estevam
2013-04-16 19:28 ` [PATCH 4/5] xgmac: " Fabio Estevam
2013-04-16 19:28 ` [PATCH 5/5] ks8851: " Fabio Estevam
2013-04-16 20:29   ` Lars-Peter Clausen [this message]
2013-04-16 20:37     ` David Miller
2013-04-17  6:27       ` Lars-Peter Clausen
2013-04-16 19:42 ` [PATCH 1/5] can: mcp251x: " Marc Kleine-Budde
2013-04-16 19:49   ` David Miller
2013-04-16 20:38 ` David Miller

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=516DB4B1.9050602@metafoo.de \
    --to=lars@metafoo.de \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=joe@perches.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;
as well as URLs for NNTP newsgroup(s).