From: Jonathan Cameron <jic23@kernel.org>
To: Irina Tirdea <irina.tirdea@intel.com>, linux-iio@vger.kernel.org
Cc: Peter Meerwald <pmeerw@pmeerw.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Daniel Baluta <daniel.baluta@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] iio: accel: kxcjk-1013: only set power state if CONFIG_PM is defined
Date: Sat, 06 Dec 2014 11:16:12 +0000 [thread overview]
Message-ID: <5482E57C.1030503@kernel.org> (raw)
In-Reply-To: <1417817890-10252-3-git-send-email-irina.tirdea@intel.com>
On 05/12/14 22:18, Irina Tirdea wrote:
> When CONFIG_PM is not defined and the driver tries to power off the device,
> kxcjk1013_set_power_state will call pm_runtime_put_autosuspend, which is
> not implemented (wil return -ENOSYS).
>
> Only call pm_runtime calls to change power state when CONFIG_PM is defined.
>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Applied to the togreg branch of iio.git
Thanks
> ---
> drivers/iio/accel/kxcjk-1013.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index aed3777..7b0a9da 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -376,6 +376,7 @@ static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
>
> static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
> {
> +#ifdef CONFIG_PM
> int ret;
>
> if (on)
> @@ -389,6 +390,7 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
> "Failed: kxcjk1013_set_power_state for %d\n", on);
> return ret;
> }
> +#endif
>
> return 0;
> }
>
next prev parent reply other threads:[~2014-12-06 11:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 22:18 [PATCH 0/4] PM fixes for kxcjk-1013 Irina Tirdea
2014-12-05 22:18 ` [PATCH 1/4] iio: accel: kxcjk-1013: always power on device in resume Irina Tirdea
2014-12-06 11:15 ` Jonathan Cameron
2014-12-05 22:18 ` [PATCH 2/4] iio: accel: kxcjk-1013: only set power state if CONFIG_PM is defined Irina Tirdea
2014-12-06 11:16 ` Jonathan Cameron [this message]
2014-12-05 22:18 ` [PATCH 3/4] iio: accel: kxcjk-1013: error handling when set mode fails Irina Tirdea
2014-12-06 11:11 ` Jonathan Cameron
2014-12-05 22:18 ` [PATCH 4/4] iio: accel: kxcjk-1013: power off device if probe fails Irina Tirdea
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=5482E57C.1030503@kernel.org \
--to=jic23@kernel.org \
--cc=daniel.baluta@intel.com \
--cc=irina.tirdea@intel.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=srinivas.pandruvada@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.