summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2017-09-17 17:01:03 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2017-10-09 21:50:03 +0200
commitd2ff1956ba279bc1400924b20f85e25c4d4ca989 (patch)
tree9d1b160245091bd69018213aa34bbea6b1526a8a /drivers/iio/accel
parentiio: accel: kxcjk1013: make sysfs/sampling_frequency_avail dynamic (diff)
downloadlinux-d2ff1956ba279bc1400924b20f85e25c4d4ca989.tar.xz
linux-d2ff1956ba279bc1400924b20f85e25c4d4ca989.zip
iio: accel: kxcjk1013: make sampling_frequency_avail per-type
Make sampling_frequency_avail per-type - like sampling_frequency is. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/kxcjk-1013.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index ee492b00642b..cc068b6bc114 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -889,12 +889,13 @@ static ssize_t kxcjk1013_get_samp_freq_avail(struct device *dev,
return sprintf(buf, "%s\n", kxcjk1013_samp_freq_avail);
}
-static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(kxcjk1013_get_samp_freq_avail);
+static IIO_DEVICE_ATTR(in_accel_sampling_frequency_available, S_IRUGO,
+ kxcjk1013_get_samp_freq_avail, NULL, 0);
static IIO_CONST_ATTR(in_accel_scale_available, "0.009582 0.019163 0.038326");
static struct attribute *kxcjk1013_attributes[] = {
- &iio_dev_attr_sampling_frequency_available.dev_attr.attr,
+ &iio_dev_attr_in_accel_sampling_frequency_available.dev_attr.attr,
&iio_const_attr_in_accel_scale_available.dev_attr.attr,
NULL,
};