From 2d239c9e92087d5f4f667371ae350db9f76e3191 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sun, 22 Jun 2014 20:59:00 +0100 Subject: iio:st sensors: remove custom sampling frequence attribute in favour of core support. This allows in kernel client drivers to access this Signed-off-by: Jonathan Cameron Cc: Denis Ciocca Reviewed-by: Hartmut Knaack --- drivers/iio/common/st_sensors/st_sensors_core.c | 29 ------------------------- 1 file changed, 29 deletions(-) (limited to 'drivers/iio/common') diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c index e8b932fed70e..30fb6407fad0 100644 --- a/drivers/iio/common/st_sensors/st_sensors_core.c +++ b/drivers/iio/common/st_sensors/st_sensors_core.c @@ -463,35 +463,6 @@ read_wai_error: } EXPORT_SYMBOL(st_sensors_check_device_support); -ssize_t st_sensors_sysfs_get_sampling_frequency(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct st_sensor_data *adata = iio_priv(dev_get_drvdata(dev)); - - return sprintf(buf, "%d\n", adata->odr); -} -EXPORT_SYMBOL(st_sensors_sysfs_get_sampling_frequency); - -ssize_t st_sensors_sysfs_set_sampling_frequency(struct device *dev, - struct device_attribute *attr, const char *buf, size_t size) -{ - int err; - unsigned int odr; - struct iio_dev *indio_dev = dev_get_drvdata(dev); - - err = kstrtoint(buf, 10, &odr); - if (err < 0) - goto conversion_error; - - mutex_lock(&indio_dev->mlock); - err = st_sensors_set_odr(indio_dev, odr); - mutex_unlock(&indio_dev->mlock); - -conversion_error: - return err < 0 ? err : size; -} -EXPORT_SYMBOL(st_sensors_sysfs_set_sampling_frequency); - ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev, struct device_attribute *attr, char *buf) { -- cgit v1.2.3