summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2019-11-22 15:24:14 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-11-23 12:02:05 +0000
commit6a4d6a7d6588d8c15501542da786ebff6602475c (patch)
treed6dfd2f0ef102ec50eaac9d192e8fe6fd04e06dd /drivers/iio
parent100bfa38c8cb81ccbbd17ee4f0c1164f455f6039 (diff)
downloadtalos-op-linux-6a4d6a7d6588d8c15501542da786ebff6602475c.tar.gz
talos-op-linux-6a4d6a7d6588d8c15501542da786ebff6602475c.zip
iio: imu: adis: create an unlocked version of adis_check_status()
This one also gets re-used in certain operations, so it makes sense to have an unlocked version of this to group it with other reads/writes/operations to have a single lock for the whole state change. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/imu/adis.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index 5cf7a15be6ee..b63d6e6f5415 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -277,18 +277,18 @@ out_unlock:
EXPORT_SYMBOL(adis_enable_irq);
/**
- * adis_check_status() - Check the device for error conditions
+ * __adis_check_status() - Check the device for error conditions (unlocked)
* @adis: The adis device
*
* Returns 0 on success, a negative error code otherwise
*/
-int adis_check_status(struct adis *adis)
+int __adis_check_status(struct adis *adis)
{
uint16_t status;
int ret;
int i;
- ret = adis_read_reg_16(adis, adis->data->diag_stat_reg, &status);
+ ret = __adis_read_reg_16(adis, adis->data->diag_stat_reg, &status);
if (ret)
return ret;
@@ -306,7 +306,7 @@ int adis_check_status(struct adis *adis)
return -EIO;
}
-EXPORT_SYMBOL_GPL(adis_check_status);
+EXPORT_SYMBOL_GPL(__adis_check_status);
/**
* adis_reset() - Reset the device
OpenPOWER on IntegriCloud