summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@intel.com>2014-12-06 00:18:07 +0200
committerJonathan Cameron <jic23@kernel.org>2014-12-12 12:28:26 +0000
commitd3653d09891b57f2e8089b8908f24a2e97576a49 (patch)
treebc30bdb7d0ecacb3d51a323ac7bf097f7430e67c /drivers/iio/accel
parent3a2ecc3d2dce6e051b6afc319bb380c829e4e4fd (diff)
downloadop-kernel-dev-d3653d09891b57f2e8089b8908f24a2e97576a49.zip
op-kernel-dev-d3653d09891b57f2e8089b8908f24a2e97576a49.tar.gz
iio: accel: kxcjk-1013: always power on device in resume
When the system resumes, it will first call system resume and then runtime suspend (if CONFIG_RUNTIME_PM is enabled). There is no need to conditionally power on the device in system resume, so always power it on and leave runtime suspend to power it off if needed. Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> 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>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/kxcjk-1013.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index 1720e9a..aed3777 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -1354,10 +1354,7 @@ static int kxcjk1013_resume(struct device *dev)
int ret = 0;
mutex_lock(&data->mutex);
- /* Check, if the suspend occured while active */
- if (data->dready_trigger_on || data->motion_trigger_on ||
- data->ev_enable_state)
- ret = kxcjk1013_set_mode(data, OPERATION);
+ ret = kxcjk1013_set_mode(data, OPERATION);
mutex_unlock(&data->mutex);
return ret;
OpenPOWER on IntegriCloud