iio: accel: kxcjk-1013: only set power state if CONFIG_PM is defined
authorIrina Tirdea <irina.tirdea@intel.com>
Fri, 5 Dec 2014 22:18:08 +0000 (00:18 +0200)
committerJonathan Cameron <jic23@kernel.org>
Fri, 12 Dec 2014 12:28:27 +0000 (12:28 +0000)
commitc75b8dc84fd28511224a4cd2bfa791bb56a06172
treec14b6e6fda34766d987f097a1d87c0100970c99f
parentd3653d09891b57f2e8089b8908f24a2e97576a49
iio: accel: kxcjk-1013: only set power state if CONFIG_PM is defined

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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/kxcjk-1013.c