iio: light: isl29028: Balance runtime pm + use pm_runtime_resume_and_get()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 May 2021 11:33:28 +0000 (12:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:54:25 +0000 (13:54 +0100)
commita2fa3debc12e4a401a4c6febc1804036a62f1e31
treee5e149a155923429cdf81e5507f3236a35626feb
parent41120ebbb1eb5e9dec93320e259d5b2c93226073
iio: light: isl29028: Balance runtime pm + use pm_runtime_resume_and_get()

In remove this driver called pm_runtime_put_noidle() but there is
no matching get operation.  This does not cause any problems because
the reference counter will not change if already zero, but it
does make the code harder to reason about so should be dropped.

Whilst we are here, use pm_runtime_resume_and_get() to replace open
coded version.
Found using coccicheck script under review at:
https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-3-jic23@kernel.org
drivers/iio/light/isl29028.c