Jonathan Cameron wrote on 2012-05-30: > There is no reason why userspace should want to do this manually. > Hence, lets drop this abi. > > Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxxx> Acked-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx> > --- > drivers/staging/iio/accel/adis16201_core.c | 27 -------------------- > ------ drivers/staging/iio/accel/adis16203_core.c | 28 > -------------------- ------- drivers/staging/iio/accel/adis16204_core.c > | 20 ------------------- drivers/staging/iio/accel/adis16209_core.c | > 29 -------------------- -------- > drivers/staging/iio/accel/adis16220_core.c | 24 -------------------- > --- drivers/staging/iio/accel/adis16240_core.c | 20 > ------------------- 6 files changed, 148 deletions(-) > diff --git a/drivers/staging/iio/accel/adis16201_core.c > b/drivers/staging/iio/accel/adis16201_core.c index 02b3409..204106b > 100644 --- a/drivers/staging/iio/accel/adis16201_core.c +++ > b/drivers/staging/iio/accel/adis16201_core.c @@ -159,21 +159,6 @@ static > int adis16201_reset(struct iio_dev *indio_dev) > return ret; > } > -static ssize_t adis16201_write_reset(struct device *dev, > - struct device_attribute *attr, > - const char *buf, size_t len) > -{ > - int ret; > - bool res; > - > - if (len < 1) > - return -EINVAL; > - ret = strtobool(buf, &res); > - if (ret || !res) > - return ret; > - return adis16201_reset(dev_to_iio_dev(dev)); > -} > - > int adis16201_set_irq(struct iio_dev *indio_dev, bool enable) > { > int ret = 0; > @@ -507,19 +492,7 @@ static struct iio_chan_spec adis16201_channels[] = > { > IIO_CHAN_SOFT_TIMESTAMP(7) > }; > -static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16201_write_reset, 0); > - -static struct attribute *adis16201_attributes[] = { > - &iio_dev_attr_reset.dev_attr.attr, - NULL -}; - -static const struct > attribute_group adis16201_attribute_group = { - .attrs = > adis16201_attributes, -}; - > static const struct iio_info adis16201_info = { - .attrs = > &adis16201_attribute_group, .read_raw = &adis16201_read_raw, > .write_raw = &adis16201_write_raw, .driver_module = THIS_MODULE, > diff --git a/drivers/staging/iio/accel/adis16203_core.c > b/drivers/staging/iio/accel/adis16203_core.c index 15d46bf..22085e9 > 100644 --- a/drivers/staging/iio/accel/adis16203_core.c +++ > b/drivers/staging/iio/accel/adis16203_core.c @@ -178,22 +178,6 @@ static > int adis16203_reset(struct iio_dev *indio_dev) > return ret; > } > -static ssize_t adis16203_write_reset(struct device *dev, > - struct device_attribute *attr, > - const char *buf, size_t len) > -{ > - struct iio_dev *indio_dev = dev_to_iio_dev(dev); > - if (len < 1) > - return -EINVAL; > - switch (buf[0]) { > - case '1': > - case 'y': > - case 'Y': > - return adis16203_reset(indio_dev); > - } > - return -EINVAL; > -} > - > int adis16203_set_irq(struct iio_dev *indio_dev, bool enable) > { > int ret = 0; > @@ -444,19 +428,7 @@ static struct iio_chan_spec adis16203_channels[] = > { > IIO_CHAN_SOFT_TIMESTAMP(5), > }; > -static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16203_write_reset, 0); > - -static struct attribute *adis16203_attributes[] = { > - &iio_dev_attr_reset.dev_attr.attr, - NULL -}; - -static const struct > attribute_group adis16203_attribute_group = { - .attrs = > adis16203_attributes, -}; - > static const struct iio_info adis16203_info = { - .attrs = > &adis16203_attribute_group, .read_raw = &adis16203_read_raw, > .write_raw = &adis16203_write_raw, .driver_module = THIS_MODULE, > diff --git a/drivers/staging/iio/accel/adis16204_core.c > b/drivers/staging/iio/accel/adis16204_core.c index ac9d95e..5c02bc6 > 100644 --- a/drivers/staging/iio/accel/adis16204_core.c +++ > b/drivers/staging/iio/accel/adis16204_core.c @@ -207,23 +207,6 @@ static > int adis16204_reset(struct iio_dev *indio_dev) > return ret; > } > -static ssize_t adis16204_write_reset(struct device *dev, > - struct device_attribute *attr, > - const char *buf, size_t len) > -{ > - struct iio_dev *indio_dev = dev_to_iio_dev(dev); > - > - if (len < 1) > - return -EINVAL; > - switch (buf[0]) { > - case '1': > - case 'y': > - case 'Y': > - return adis16204_reset(indio_dev); > - } > - return -EINVAL; > -} > - > int adis16204_set_irq(struct iio_dev *indio_dev, bool enable) > { > int ret = 0; > @@ -310,8 +293,6 @@ static > IIO_DEV_ATTR_ACCEL_XYPEAK(adis16204_read_14bit_signed, > ADIS16204_XY_PEAK_OUT); > static IIO_CONST_ATTR(in_accel_xy_scale, "0.017125"); > -static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16204_write_reset, 0); > - > enum adis16204_channel { > in_supply, > in_aux, > @@ -520,7 +501,6 @@ static struct iio_chan_spec adis16204_channels[] = > { > }; > > static struct attribute *adis16204_attributes[] = { > - &iio_dev_attr_reset.dev_attr.attr, > &iio_dev_attr_in_accel_xy.dev_attr.attr, > &iio_dev_attr_in_accel_xypeak.dev_attr.attr, > &iio_const_attr_in_accel_xy_scale.dev_attr.attr, > diff --git a/drivers/staging/iio/accel/adis16209_core.c > b/drivers/staging/iio/accel/adis16209_core.c index f6fd0d3..f4c82f1 > 100644 --- a/drivers/staging/iio/accel/adis16209_core.c +++ > b/drivers/staging/iio/accel/adis16209_core.c @@ -153,23 +153,6 @@ static > int adis16209_reset(struct iio_dev *indio_dev) > return ret; > } > -static ssize_t adis16209_write_reset(struct device *dev, > - struct device_attribute *attr, > - const char *buf, size_t len) > -{ > - struct iio_dev *indio_dev = dev_to_iio_dev(dev); > - > - if (len < 1) > - return -EINVAL; > - switch (buf[0]) { > - case '1': > - case 'y': > - case 'Y': > - return adis16209_reset(indio_dev); > - } > - return -EINVAL; > -} > - > int adis16209_set_irq(struct iio_dev *indio_dev, bool enable) > { > int ret = 0; > @@ -519,19 +502,7 @@ static struct iio_chan_spec adis16209_channels[] = > { > IIO_CHAN_SOFT_TIMESTAMP(8) > }; > -static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16209_write_reset, 0); > - -static struct attribute *adis16209_attributes[] = { > - &iio_dev_attr_reset.dev_attr.attr, - NULL -}; - -static const struct > attribute_group adis16209_attribute_group = { - .attrs = > adis16209_attributes, -}; - > static const struct iio_info adis16209_info = { - .attrs = > &adis16209_attribute_group, .read_raw = &adis16209_read_raw, > .write_raw = &adis16209_write_raw, .driver_module = THIS_MODULE, > diff --git a/drivers/staging/iio/accel/adis16220_core.c > b/drivers/staging/iio/accel/adis16220_core.c index 6a9ac89..2877410 > 100644 --- a/drivers/staging/iio/accel/adis16220_core.c +++ > b/drivers/staging/iio/accel/adis16220_core.c @@ -204,26 +204,6 @@ static > int adis16220_reset(struct iio_dev *indio_dev) > return ret; > } > -static ssize_t adis16220_write_reset(struct device *dev, > - struct device_attribute *attr, > - const char *buf, size_t len) > -{ > - struct iio_dev *indio_dev = dev_to_iio_dev(dev); > - bool val; > - int ret; > - > - ret = strtobool(buf, &val); > - if (ret) > - return ret; > - if (!val) > - return -EINVAL; > - > - ret = adis16220_reset(indio_dev); > - if (ret) > - return ret; > - return len; > -} > - > static ssize_t adis16220_write_capture(struct device *dev, struct > device_attribute *attr, const char *buf, size_t len) @@ -454,9 +434,6 > @@ static struct bin_attribute adc2_bin = { .size = > ADIS16220_CAPTURE_SIZE, }; > -static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, > - adis16220_write_reset, 0); > - > #define IIO_DEV_ATTR_CAPTURE(_store) \ > IIO_DEVICE_ATTR(capture, S_IWUSR, NULL, _store, 0) > @@ -611,7 +588,6 @@ static const struct iio_chan_spec > adis16220_channels[] = { > }; > > static struct attribute *adis16220_attributes[] = { > - &iio_dev_attr_reset.dev_attr.attr, > &iio_dev_attr_capture.dev_attr.attr, > &iio_dev_attr_capture_count.dev_attr.attr, NULL > diff --git a/drivers/staging/iio/accel/adis16240_core.c > b/drivers/staging/iio/accel/adis16240_core.c index 8b15eae..2df39d1 > 100644 --- a/drivers/staging/iio/accel/adis16240_core.c +++ > b/drivers/staging/iio/accel/adis16240_core.c @@ -199,23 +199,6 @@ static > int adis16240_reset(struct iio_dev *indio_dev) > return ret; > } > -static ssize_t adis16240_write_reset(struct device *dev, > - struct device_attribute *attr, > - const char *buf, size_t len) > -{ > - struct iio_dev *indio_dev = dev_to_iio_dev(dev); > - > - if (len < 1) > - return -EINVAL; > - switch (buf[0]) { > - case '1': > - case 'y': > - case 'Y': > - return adis16240_reset(indio_dev); > - } > - return -EINVAL; > -} > - > int adis16240_set_irq(struct iio_dev *indio_dev, bool enable) > { > int ret = 0; > @@ -329,8 +312,6 @@ static > IIO_DEVICE_ATTR(in_accel_xyz_squared_peak_raw, S_IRUGO, > adis16240_read_12bit_signed, NULL, > ADIS16240_XYZPEAK_OUT); > -static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16240_write_reset, 0); > - > static IIO_CONST_ATTR_SAMP_FREQ_AVAIL("4096"); > > enum adis16240_chan { > @@ -556,7 +537,6 @@ static struct iio_chan_spec adis16240_channels[] = > { > static struct attribute *adis16240_attributes[] = { > &iio_dev_attr_in_accel_xyz_squared_peak_raw.dev_attr.attr, > &iio_const_attr_sampling_frequency_available.dev_attr.attr, > - &iio_dev_attr_reset.dev_attr.attr, NULL }; Greetings, Michael -- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif -- 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