RE: [PATCH] iio: gyro: bmg160: only set power state if PM_RUNTIME is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-iio-owner@xxxxxxxxxxxxxxx [mailto:linux-iio-owner@xxxxxxxxxxxxxxx] On Behalf Of Hartmut Knaack
> Sent: 06 September, 2014 15:12
> To: Tirdea, Irina; Jonathan Cameron; linux-iio@xxxxxxxxxxxxxxx
> Cc: Lars-Peter Clausen; Peter Meerwald; Srinivas Pandruvada; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] iio: gyro: bmg160: only set power state if PM_RUNTIME is defined
> 
> Irina Tirdea schrieb:
> > 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.
> Unless there is anything more to come, what about putting the #ifdef into first line inside bmg160_set_power_state() and just an
> #endif before the return 0 at the end? Saves 5 lines.

Thanks for the suggestion! Will fix it in v2.

> > Signed-off-by: Irina Tirdea <irina.tirdea@xxxxxxxxx>
> > Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> > ---


Thanks,
Irina

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux