iio: pressure: dps310: Refactor startup procedure
authorEddie James <eajames@linux.ibm.com>
Thu, 15 Sep 2022 19:57:18 +0000 (14:57 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 Sep 2022 17:42:55 +0000 (18:42 +0100)
commitc2329717bdd3fa62f8a2f3d8d85ad0bee4556bd7
treeb2efd9dc3102d55947f20b87cc0d3be7e53b01aa
parent4b622a658c21d4de7f6fdb6b5e1c99bfb20b2d22
iio: pressure: dps310: Refactor startup procedure

Move the startup procedure into a function, and correct a missing
check on the return code for writing the PRS_CFG register.

Cc: <stable@vger.kernel.org>
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220915195719.136812-2-eajames@linux.ibm.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/dps310.c