summaryrefslogtreecommitdiff
path: root/drivers/iio/imu/adis16400.c
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2020-04-30 14:04:22 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-05-03 14:47:56 +0100
commitb7190859abc0056d9514a9e2ff506850304a1288 (patch)
treea70a4172ed793feae4f2404541d5855ac589ea26 /drivers/iio/imu/adis16400.c
parent6f1c9e0da9aae51177457731357ae8a2c8af27cd (diff)
iio: imu: adis16xxx: use helper to access iio core debugfs dir
The IIO core provides a iio_get_debugfs_dentry() helper. It seems that the ADIS IMU drivers access that field directly. This change converts them to use iio_get_debugfs_dentry() instead. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Acked-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/imu/adis16400.c')
-rw-r--r--drivers/iio/imu/adis16400.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c
index 439feb755d82..229f2ff98469 100644
--- a/drivers/iio/imu/adis16400.c
+++ b/drivers/iio/imu/adis16400.c
@@ -281,18 +281,16 @@ DEFINE_DEBUGFS_ATTRIBUTE(adis16400_flash_count_fops,
static int adis16400_debugfs_init(struct iio_dev *indio_dev)
{
struct adis16400_state *st = iio_priv(indio_dev);
+ struct dentry *d = iio_get_debugfs_dentry(indio_dev);
if (st->variant->flags & ADIS16400_HAS_SERIAL_NUMBER)
debugfs_create_file_unsafe("serial_number", 0400,
- indio_dev->debugfs_dentry, st,
- &adis16400_serial_number_fops);
+ d, st, &adis16400_serial_number_fops);
if (st->variant->flags & ADIS16400_HAS_PROD_ID)
debugfs_create_file_unsafe("product_id", 0400,
- indio_dev->debugfs_dentry, st,
- &adis16400_product_id_fops);
+ d, st, &adis16400_product_id_fops);
debugfs_create_file_unsafe("flash_count", 0400,
- indio_dev->debugfs_dentry, st,
- &adis16400_flash_count_fops);
+ d, st, &adis16400_flash_count_fops);
return 0;
}