iio: proximity: srf04: Use pm_runtime_resume_and_get() and handle error
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 May 2021 11:33:51 +0000 (12:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:54:27 +0000 (13:54 +0100)
commit9009a732a87fd6598a5791e0cc4fd2f7d2d602c5
treea9958f21f1bf16d5b811e3ac668feadaac468d6e
parentdb9c6c2ec4a8789e2445d4a861dfce6d66b10df9
iio: proximity: srf04: Use pm_runtime_resume_and_get() and handle error

Previously this driver used pm_runtime_sync_get() and did not handle any
errors that occurred.  Moving to the new pm_runtime_resume_and_get() +
handle errors.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Andreas Klinger <ak@it-klinger.de>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-26-jic23@kernel.org
drivers/iio/proximity/srf04.c