Hi, here is one of the rough edges I was talking about earlier. On 01/26/2013 12:44 AM, Denis Ciocca wrote: > +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); This function is no longer used outside the st_sensors core module, so there is no need to export it anymore. In fact it is only used in st_sensors_sysfs_sampling_frequency_avail, which itself is not more than the call to st_sensors_get_sampling_frequency_avl, so I'd just move the contents of st_sensors_get_sampling_frequency_avl to st_sensors_sysfs_sampling_frequency_avail. > + > +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); Similar here. > + [...] -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html