summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorDenis CIOCCA <denis.ciocca@st.com>2013-01-30 09:15:00 +0000
committerJonathan Cameron <jic23@kernel.org>2013-02-02 09:37:54 +0000
commit4d2e4fc224d0d5e56fdb0baa7cd135d1557b0a25 (patch)
treec60c42540c8a9f0d1341ed00afe89d4ee0fb8933 /drivers/iio
parent9dbf091da080508e9f632d307f357beb79a0766b (diff)
downloadlinux-4d2e4fc224d0d5e56fdb0baa7cd135d1557b0a25.tar.bz2
iio:common: removed unused functions outside st_sensors library
This patch remove st_sensors_get_sampling_frequency_avl and st_sensors_get_scale_avl functions used only in st_sensors_sysfs_sampling_frequency_avail and st_sensors_sysfs_scale_avail sysfs functions. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_core.c70
1 files changed, 28 insertions, 42 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
index fba6d6847b6d..0198324a8b0c 100644
--- a/drivers/iio/common/st_sensors/st_sensors_core.c
+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
@@ -38,46 +38,6 @@ st_sensors_write_data_with_mask_error:
return err;
}
-int st_sensors_get_sampling_frequency_avl(struct iio_dev *indio_dev, char *buf)
-{
- int i, len = 0;
- struct st_sensor_data *sdata = iio_priv(indio_dev);
-
- mutex_lock(&indio_dev->mlock);
- for (i = 0; i < ST_SENSORS_ODR_LIST_MAX; i++) {
- if (sdata->sensor->odr.odr_avl[i].hz == 0)
- break;
-
- len += scnprintf(buf + len, PAGE_SIZE - len, "%d ",
- sdata->sensor->odr.odr_avl[i].hz);
- }
- mutex_unlock(&indio_dev->mlock);
- buf[len - 1] = '\n';
-
- return len;
-}
-EXPORT_SYMBOL(st_sensors_get_sampling_frequency_avl);
-
-int st_sensors_get_scale_avl(struct iio_dev *indio_dev, char *buf)
-{
- int i, len = 0;
- struct st_sensor_data *sdata = iio_priv(indio_dev);
-
- mutex_lock(&indio_dev->mlock);
- for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) {
- if (sdata->sensor->fs.fs_avl[i].num == 0)
- break;
-
- len += scnprintf(buf + len, PAGE_SIZE - len, "0.%06u ",
- sdata->sensor->fs.fs_avl[i].gain);
- }
- mutex_unlock(&indio_dev->mlock);
- buf[len - 1] = '\n';
-
- return len;
-}
-EXPORT_SYMBOL(st_sensors_get_scale_avl);
-
static int st_sensors_match_odr(struct st_sensors *sensor,
unsigned int odr, struct st_sensor_odr_avl *odr_out)
{
@@ -440,18 +400,44 @@ 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)
{
+ int i, len = 0;
struct iio_dev *indio_dev = dev_get_drvdata(dev);
+ struct st_sensor_data *sdata = iio_priv(indio_dev);
+
+ mutex_lock(&indio_dev->mlock);
+ for (i = 0; i < ST_SENSORS_ODR_LIST_MAX; i++) {
+ if (sdata->sensor->odr.odr_avl[i].hz == 0)
+ break;
+
+ len += scnprintf(buf + len, PAGE_SIZE - len, "%d ",
+ sdata->sensor->odr.odr_avl[i].hz);
+ }
+ mutex_unlock(&indio_dev->mlock);
+ buf[len - 1] = '\n';
- return st_sensors_get_sampling_frequency_avl(indio_dev, buf);
+ return len;
}
EXPORT_SYMBOL(st_sensors_sysfs_sampling_frequency_avail);
ssize_t st_sensors_sysfs_scale_avail(struct device *dev,
struct device_attribute *attr, char *buf)
{
+ int i, len = 0;
struct iio_dev *indio_dev = dev_get_drvdata(dev);
+ struct st_sensor_data *sdata = iio_priv(indio_dev);
+
+ mutex_lock(&indio_dev->mlock);
+ for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) {
+ if (sdata->sensor->fs.fs_avl[i].num == 0)
+ break;
+
+ len += scnprintf(buf + len, PAGE_SIZE - len, "0.%06u ",
+ sdata->sensor->fs.fs_avl[i].gain);
+ }
+ mutex_unlock(&indio_dev->mlock);
+ buf[len - 1] = '\n';
- return st_sensors_get_scale_avl(indio_dev, buf);
+ return len;
}
EXPORT_SYMBOL(st_sensors_sysfs_scale_avail);