lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5482E57C.1030503@kernel.org>
Date:	Sat, 06 Dec 2014 11:16:12 +0000
From:	Jonathan Cameron <jic23@...nel.org>
To:	Irina Tirdea <irina.tirdea@...el.com>, linux-iio@...r.kernel.org
CC:	Peter Meerwald <pmeerw@...erw.net>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	Daniel Baluta <daniel.baluta@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [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@...el.com>
> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.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;
>  }
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ