public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Chris Ball <cjb@laptop.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
Date: Thu, 9 Aug 2012 11:27:02 +0200	[thread overview]
Message-ID: <201208091127.03119.rjw@sisk.pl> (raw)
In-Reply-To: <1344495413-7164-1-git-send-email-thierry.reding@avionic-design.de>

On Thursday, August 09, 2012, Thierry Reding wrote:
> Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
> the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
> complain about them being unused.
> 
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>

The pm_no_operation() thing is not necessary at all, AFAICT.  I'd just
remove it entirely. :-)

Thanks,
Rafael


> ---
>  drivers/mmc/core/sdio_bus.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
> index 236842e..f8f90b4 100644
> --- a/drivers/mmc/core/sdio_bus.c
> +++ b/drivers/mmc/core/sdio_bus.c
> @@ -193,11 +193,12 @@ static int sdio_bus_remove(struct device *dev)
>  }
>  
>  #ifdef CONFIG_PM
> -
> +#ifdef CONFIG_PM_SLEEP
>  static int pm_no_operation(struct device *dev)
>  {
>  	return 0;
>  }
> +#endif
>  
>  static const struct dev_pm_ops sdio_bus_pm_ops = {
>  	SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation)
> 


  reply	other threads:[~2012-08-09  9:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09  6:56 [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings Thierry Reding
2012-08-09  9:27 ` Rafael J. Wysocki [this message]
2012-08-09  9:27   ` Thierry Reding
2012-08-09  9:55     ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2012-08-09  9:32 Thierry Reding
2012-08-09 10:00 ` Rafael J. Wysocki
2012-09-17  7:35   ` Chris Ball

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=201208091127.03119.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=thierry.reding@avionic-design.de \
    /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