From: Irina Tirdea Date: Sat, 9 Aug 2014 14:05:00 +0000 (+0100) Subject: iio: gyro: bmg160: only set power state if PM_RUNTIME is defined X-Git-Tag: fixes-for-v3.18-merge-window~15^2~437^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef1c6b23355b70356ca18c0d4c39b25dfbd7be02;p=pandora-kernel.git iio: gyro: bmg160: only set power state if PM_RUNTIME is defined 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 Acked-by: Hartmut Knaack Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed