[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5415D09A.4070204@kernel.org>
Date: Sun, 14 Sep 2014 18:30:02 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Hartmut Knaack <knaack.h@....de>,
Irina Tirdea <irina.tirdea@...el.com>,
linux-iio@...r.kernel.org
CC: Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio: gyro: bmg160: only set power state if PM_RUNTIME
is defined
On 09/09/14 23:14, Hartmut Knaack wrote:
> Irina Tirdea schrieb, Am 08.09.2014 16:05:
>> When CONFIG_PM_RUNTIME is not defined and bmg160 tries to power
>> off the device, bmg160_set_power_state will call pm_runtime_put_autosuspend,
>> which is not implemented (wil return -ENOSYS).
>>
>> Only call bmg160_set_power_state when CONFIG_PM_RUNTIME is defined.
>>
>> Signed-off-by: Irina Tirdea <irina.tirdea@...el.com>
> Acked-by: Hartmut Knaack <knaack.h@....de>
Applied to the togreg branch of iio.git. Initially pushed out as testing
for the autobuilders to play.
Thanks,
Jonathan
>> ---
>>
>> Changes in v2:
>> - moved ifdef CONFIG_PM_RUNTIME inside bmg160_set_power_state as
>> Hartmut Knaack suggested
>>
>> drivers/iio/gyro/bmg160.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/iio/gyro/bmg160.c b/drivers/iio/gyro/bmg160.c
>> index 7524698..1f967e0d 100644
>> --- a/drivers/iio/gyro/bmg160.c
>> +++ b/drivers/iio/gyro/bmg160.c
>> @@ -237,6 +237,7 @@ static int bmg160_chip_init(struct bmg160_data *data)
>>
>> static int bmg160_set_power_state(struct bmg160_data *data, bool on)
>> {
>> +#ifdef CONFIG_PM_RUNTIME
>> int ret;
>>
>> if (on)
>> @@ -251,6 +252,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
>> "Failed: bmg160_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