iio: pressure: dps310: Refactor startup procedure
authorEddie James <eajames@linux.ibm.com>
Thu, 15 Sep 2022 19:57:18 +0000 (14:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:19 +0000 (12:34 +0200)
commitbc493cd75466e4e04b3a2e65d2cef13d275c4d1d
tree5211977a687c32826269580adb7e7bade1a3a607
parent5f6bfc1926bb9fd932267b11a07e13304d77d680
iio: pressure: dps310: Refactor startup procedure

commit c2329717bdd3fa62f8a2f3d8d85ad0bee4556bd7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/pressure/dps310.c