iio: light: tsl2583: Balance runtime pm + use pm_runtime_resume_and_get()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 May 2021 11:33:29 +0000 (12:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:54:25 +0000 (13:54 +0100)
commit6fbaebae758dd68c6bda22164e61038eb72ce036
tree4ffcbcaff69007478090161b076809ddf3c7e216
parenta2fa3debc12e4a401a4c6febc1804036a62f1e31
iio: light: tsl2583: Balance runtime pm + use pm_runtime_resume_and_get()

Error paths in read_raw() and write_raw() callbacks failed to perform and
type of runtime pm put().  Remove called pm_runtime_put_noidle()
but there is no equivalent get (this is safe because the reference
count is protected against going below zero, but it is misleading.

Whilst here use pm_runtime_resume_and_get() to replace boilerplate.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Brian Masney <masneyb@onstation.org>
Reviewed-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-4-jic23@kernel.org
drivers/iio/light/tsl2583.c