summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/mma9551.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-09 14:33:32 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 15:54:25 +0300
commit2d980d7efd5fdac70505a5b82cfaef411fa72393 (patch)
tree1c9ffd73607e76b26a5041a65a141e2eb7cc34e3 /drivers/iio/accel/mma9551.c
parentd3a8969dde088fed979d0c7bebc33752c719d30c (diff)
downloadlinux-2d980d7efd5fdac70505a5b82cfaef411fa72393.tar.xz
iio: accel: mma9551/3: Balance untime pm + use pm_runtime_resume_and_get()
Both these drivers call pm_runtime_put_no_idle() when the reference count should already be zero as there is no matching get() Whilst here use pm_runtime_resume_and_get() rather than open coding. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/20210509113354.660190-7-jic23@kernel.org
Diffstat (limited to 'drivers/iio/accel/mma9551.c')
-rw-r--r--drivers/iio/accel/mma9551.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c
index 08a2303cc9df..4c359fb05480 100644
--- a/drivers/iio/accel/mma9551.c
+++ b/drivers/iio/accel/mma9551.c
@@ -515,7 +515,6 @@ static int mma9551_remove(struct i2c_client *client)
pm_runtime_disable(&client->dev);
pm_runtime_set_suspended(&client->dev);
- pm_runtime_put_noidle(&client->dev);
mutex_lock(&data->mutex);
mma9551_set_device_state(data->client, false);