lkml.org 
[lkml]   [2014]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] iio: accel: kxcjk-1013: only set power state if CONFIG_PM is defined
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;
> }
>



\
 
 \ /
  Last update: 2014-12-06 12:41    [W:0.038 / U:2.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site