From: Jonathan Cameron <jic23@kernel.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: B38611@freescale.com, linux-iio@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH 5/5] iio: adc: vf610: Remove CONFIG_PM_SLEEP ifdef's
Date: Sat, 04 Oct 2014 12:34:47 +0100 [thread overview]
Message-ID: <542FDB57.9020308@kernel.org> (raw)
In-Reply-To: <1412299526-1331-5-git-send-email-festevam@gmail.com>
On 03/10/14 02:25, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Mark the suspend/resume functions as '__maybe_unused' so that we can get rid
> of the CONFIG_PM_SLEEP ifdef.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
This is always debatable. Personally my view is that it's actually
slightly clearer what is going on with the ifdef than the maybe_unused
so my gut feeling is to leave it alone. Now if we get strong sentiments
the other way I might change my mind!
> ---
> drivers/iio/adc/vf610_adc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
> index 6164558..bae9638 100644
> --- a/drivers/iio/adc/vf610_adc.c
> +++ b/drivers/iio/adc/vf610_adc.c
> @@ -650,8 +650,7 @@ static int vf610_adc_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> -static int vf610_adc_suspend(struct device *dev)
> +static int __maybe_unused vf610_adc_suspend(struct device *dev)
> {
> struct iio_dev *indio_dev = dev_get_drvdata(dev);
> struct vf610_adc *info = iio_priv(indio_dev);
> @@ -668,7 +667,7 @@ static int vf610_adc_suspend(struct device *dev)
> return 0;
> }
>
> -static int vf610_adc_resume(struct device *dev)
> +static int __maybe_unused vf610_adc_resume(struct device *dev)
> {
> struct iio_dev *indio_dev = dev_get_drvdata(dev);
> struct vf610_adc *info = iio_priv(indio_dev);
> @@ -690,7 +689,6 @@ disable_reg:
> regulator_disable(info->vref);
> return ret;
> }
> -#endif
>
> static SIMPLE_DEV_PM_OPS(vf610_adc_pm_ops, vf610_adc_suspend, vf610_adc_resume);
>
>
next prev parent reply other threads:[~2014-10-04 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 1:25 [PATCH 1/5] iio: adc: vf610: Propagate the real error when platform_get_irq() fails Fabio Estevam
2014-10-03 1:25 ` [PATCH 2/5] iio: adc: vf610: Return the error code directly Fabio Estevam
2014-10-04 11:28 ` Jonathan Cameron
2014-10-03 1:25 ` [PATCH 3/5] iio: adc: vf610: Disable the regulator on error Fabio Estevam
2014-10-04 11:30 ` Jonathan Cameron
2014-10-03 1:25 ` [PATCH 4/5] iio: adc: vf610: SIMPLE_DEV_PM_OPS can fit on a single line Fabio Estevam
2014-10-04 11:31 ` Jonathan Cameron
2014-10-03 1:25 ` [PATCH 5/5] iio: adc: vf610: Remove CONFIG_PM_SLEEP ifdef's Fabio Estevam
2014-10-04 11:34 ` Jonathan Cameron [this message]
2014-10-04 11:26 ` [PATCH 1/5] iio: adc: vf610: Propagate the real error when platform_get_irq() fails Jonathan Cameron
2014-10-04 18:46 ` Fabio Estevam
2014-10-09 19:57 ` Jonathan Cameron
2014-10-09 19:59 ` Jonathan Cameron
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=542FDB57.9020308@kernel.org \
--to=jic23@kernel.org \
--cc=B38611@freescale.com \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=linux-iio@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).