linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Hartmut Knaack <knaack.h@gmx.de>,
	Irina Tirdea <irina.tirdea@intel.com>,
	linux-iio@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: gyro: bmg160: only set power state if PM_RUNTIME is defined
Date: Sun, 14 Sep 2014 18:30:02 +0100	[thread overview]
Message-ID: <5415D09A.4070204@kernel.org> (raw)
In-Reply-To: <540F7BB5.2080801@gmx.de>

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@intel.com>
> Acked-by: Hartmut Knaack <knaack.h@gmx.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;
>>  }
>>
> 

      reply	other threads:[~2014-09-14 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 14:05 [PATCH v2] iio: gyro: bmg160: only set power state if PM_RUNTIME is defined Irina Tirdea
2014-09-09 22:14 ` Hartmut Knaack
2014-09-14 17:30   ` Jonathan Cameron [this message]

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=5415D09A.4070204@kernel.org \
    --to=jic23@kernel.org \
    --cc=irina.tirdea@intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --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 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).