staging:iio:buffering cleanup ring_buffer_register_ex naming.
authorJonathan Cameron <jic23@cam.ac.uk>
Tue, 30 Aug 2011 11:41:14 +0000 (12:41 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:00:28 +0000 (16:00 -0700)
Now the old method is long gone, lets get rid of the _ex and whilst
here remove the unused id parameter.

Trivial mechanical change, but will break any out of tree drivers
using this.

V2: rebase
V3: rebase

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21 files changed:
drivers/staging/iio/accel/adis16201_core.c
drivers/staging/iio/accel/adis16203_core.c
drivers/staging/iio/accel/adis16204_core.c
drivers/staging/iio/accel/adis16209_core.c
drivers/staging/iio/accel/adis16240_core.c
drivers/staging/iio/accel/lis3l02dq_core.c
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/iio/adc/ad7192.c
drivers/staging/iio/adc/ad7298_core.c
drivers/staging/iio/adc/ad7476_core.c
drivers/staging/iio/adc/ad7606_core.c
drivers/staging/iio/adc/ad7793.c
drivers/staging/iio/adc/ad7887_core.c
drivers/staging/iio/adc/ad799x_core.c
drivers/staging/iio/adc/max1363_core.c
drivers/staging/iio/gyro/adis16260_core.c
drivers/staging/iio/impedance-analyzer/ad5933.c
drivers/staging/iio/imu/adis16400_core.c
drivers/staging/iio/industrialio-ring.c
drivers/staging/iio/meter/ade7758_core.c
drivers/staging/iio/ring_generic.h

index d16c45959fd3da4ea279ca2ce46a6f381d787311..30ac7e2ee0233c3847a6cdbc22aba0c66afe889c 100644 (file)
@@ -497,9 +497,9 @@ static int __devinit adis16201_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         adis16201_channels,
-                                         ARRAY_SIZE(adis16201_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      adis16201_channels,
+                                      ARRAY_SIZE(adis16201_channels));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index cc3869bbf465c8720b1a487c1ba9c40f52c7fb97..dc52462ecf39c7a20bfa0810f5ba60048c7def15 100644 (file)
@@ -451,9 +451,9 @@ static int __devinit adis16203_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         adis16203_channels,
-                                         ARRAY_SIZE(adis16203_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      adis16203_channels,
+                                      ARRAY_SIZE(adis16203_channels));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index 3cc229d9564548b6093a19b00f3f61c73bfc2c54..dedccddeb5882cab2c3c25a74f26cc2d11b865a6 100644 (file)
@@ -526,9 +526,9 @@ static int __devinit adis16204_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         adis16204_channels,
-                                         ARRAY_SIZE(adis16204_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      adis16204_channels,
+                                      ARRAY_SIZE(adis16204_channels));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index fa4c6c055db8eabd0bfb49385c820b38b95cd500..d8f4b27efc752950fed3787b2a2f5f085f4102ae 100644 (file)
@@ -499,9 +499,9 @@ static int __devinit adis16209_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         adis16209_channels,
-                                         ARRAY_SIZE(adis16209_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      adis16209_channels,
+                                      ARRAY_SIZE(adis16209_channels));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index 2c6ced0366d351ae8371d667807e25a74600e129..f6fa0ba49737e99b5204dd9ac35f77bc0f04e641 100644 (file)
@@ -552,9 +552,9 @@ static int __devinit adis16240_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         adis16240_channels,
-                                         ARRAY_SIZE(adis16240_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      adis16240_channels,
+                                      ARRAY_SIZE(adis16240_channels));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index b57bf5029509338bfd48f9e1988004b0ddbd667e..ed07538d1009c01dc286a17049294bb819718c1d 100644 (file)
@@ -695,9 +695,9 @@ static int __devinit lis3l02dq_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         lis3l02dq_channels,
-                                         ARRAY_SIZE(lis3l02dq_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      lis3l02dq_channels,
+                                      ARRAY_SIZE(lis3l02dq_channels));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index 449020054eef47af08ef6bee803eff4e51663463..8281d66132d43b0f3df60942386f0f43253af38f 100644 (file)
@@ -1156,9 +1156,9 @@ static int __devinit sca3000_probe(struct spi_device *spi)
        if (ret < 0)
                goto error_free_dev;
        regdone = 1;
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         sca3000_channels,
-                                         ARRAY_SIZE(sca3000_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      sca3000_channels,
+                                      ARRAY_SIZE(sca3000_channels));
        if (ret < 0)
                goto error_unregister_dev;
        if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) {
index 6e1656e44e372c0cb8ac2c776d3f60c88176116c..80b067c5b21251f6fcd9182451e5dd276ee797e0 100644 (file)
@@ -1098,9 +1098,9 @@ static int __devinit ad7192_probe(struct spi_device *spi)
        if (ret)
                goto error_unreg_ring;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         indio_dev->channels,
-                                         indio_dev->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      indio_dev->channels,
+                                      indio_dev->num_channels);
        if (ret)
                goto error_remove_trigger;
 
index 9c50b022d1013637929dd05e0314bc2fc3149351..6487359dc4c86be9dc8ee0dacbe8f482bbc59958 100644 (file)
@@ -223,9 +223,9 @@ static int __devinit ad7298_probe(struct spi_device *spi)
                goto error_disable_reg;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         &ad7298_channels[1], /* skip temp0 */
-                                         ARRAY_SIZE(ad7298_channels) - 1);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      &ad7298_channels[1], /* skip temp0 */
+                                      ARRAY_SIZE(ad7298_channels) - 1);
        if (ret)
                goto error_cleanup_ring;
 
index bea9e82057fc961bc27263734e41da5075b48700..f0393d59ccaf46571dd486c4d03ccc187582cf32 100644 (file)
@@ -186,9 +186,9 @@ static int __devinit ad7476_probe(struct spi_device *spi)
        if (ret)
                goto error_disable_reg;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         st->chip_info->channel,
-                                         ARRAY_SIZE(st->chip_info->channel));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      st->chip_info->channel,
+                                      ARRAY_SIZE(st->chip_info->channel));
        if (ret)
                goto error_cleanup_ring;
        return 0;
index 7aef4d5188fa8c37a41350de4a4fc1a02b0e0365..7b43da93d77919e2e3d4f36784642288fe8a4aeb 100644 (file)
@@ -506,9 +506,9 @@ struct iio_dev *ad7606_probe(struct device *dev, int irq,
                goto error_free_irq;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         indio_dev->channels,
-                                         indio_dev->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      indio_dev->channels,
+                                      indio_dev->num_channels);
        if (ret)
                goto error_cleanup_ring;
 
index ed993e3490841e0e24f20f8f425beafa7dac8a3a..38095eba0994da4da8c5ccdd1f00d220089ace75 100644 (file)
@@ -895,9 +895,9 @@ static int __devinit ad7793_probe(struct spi_device *spi)
        if (ret)
                goto error_unreg_ring;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         indio_dev->channels,
-                                         indio_dev->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      indio_dev->channels,
+                                      indio_dev->num_channels);
        if (ret)
                goto error_remove_trigger;
 
index 184ead17afce4992d7a4a352f7844992b8663fed..e71d0884901096429cb227a42b3ae842740353ac 100644 (file)
@@ -194,9 +194,9 @@ static int __devinit ad7887_probe(struct spi_device *spi)
                goto error_disable_reg;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         indio_dev->channels,
-                                         indio_dev->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      indio_dev->channels,
+                                      indio_dev->num_channels);
        if (ret)
                goto error_cleanup_ring;
        return 0;
index b21e8688afd8924b0e97e7044de9036504186913..299183c05d434835ee96e62335f0955e6f861d21 100644 (file)
@@ -706,9 +706,9 @@ static int __devinit ad799x_probe(struct i2c_client *client,
                goto error_cleanup_ring;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         indio_dev->channels,
-                                         indio_dev->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      indio_dev->channels,
+                                      indio_dev->num_channels);
        if (ret)
                goto error_cleanup_ring;
 
index 85fb74bf0eaddce14b664be686b8d1b5c3878f7e..e921efa7196f59f353eacc47f63f703ca5473740 100644 (file)
@@ -1313,9 +1313,9 @@ static int __devinit max1363_probe(struct i2c_client *client,
        if (ret)
                goto error_cleanup_ring;
        regdone = 1;
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         st->chip_info->channels,
-                                         st->chip_info->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      st->chip_info->channels,
+                                      st->chip_info->num_channels);
        if (ret)
                goto error_cleanup_ring;
 
index 5541cdda1762766a9c66f8cae141b73940ed6843..ed3b6db21f1269de85a308d6da7cd25a57165756 100644 (file)
@@ -629,9 +629,9 @@ static int __devinit adis16260_probe(struct spi_device *spi)
        if (ret)
                goto error_unreg_ring_funcs;
        regdone = 1;
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         indio_dev->channels,
-                                         ARRAY_SIZE(adis16260_channels_x));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      indio_dev->channels,
+                                      ARRAY_SIZE(adis16260_channels_x));
        if (ret) {
                printk(KERN_ERR "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index 8668291ffdc76b753aaef863027df020091dc5f6..1c1cd8eac9de4aa5bcc8b5f8fab70b8a4ad9c4d1 100644 (file)
@@ -733,7 +733,7 @@ static int __devinit ad5933_probe(struct i2c_client *client,
        regdone = 1;
 
        /* skip temp0_input, register in0_(real|imag)_raw */
-       ret = iio_ring_buffer_register_ex(indio_dev, 0, &ad5933_channels[1], 2);
+       ret = iio_ring_buffer_register(indio_dev, &ad5933_channels[1], 2);
        if (ret)
                goto error_unreg_ring;
 
index 21c1a0768d676d7a79bf6044fa74d894a69c4836..3e8fcd3354f206e337ba3abc5a2328d7fc34d0b6 100644 (file)
@@ -853,9 +853,9 @@ static int __devinit adis16400_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         st->variant->channels,
-                                         st->variant->num_channels);
+       ret = iio_ring_buffer_register(indio_dev,
+                                      st->variant->channels,
+                                      st->variant->num_channels);
        if (ret) {
                dev_err(&spi->dev, "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index 1607293b036dcb0c20eddf68efe4b5aa2009b135..947f5425ed78ebd20f0c9296c3bd15f2b566f657 100644 (file)
@@ -277,9 +277,9 @@ static void __iio_ring_attr_cleanup(struct iio_dev *indio_dev)
                                   &iio_scan_el_dummy_group);
 }
 
-int iio_ring_buffer_register_ex(struct iio_dev *indio_dev, int id,
-                               const struct iio_chan_spec *channels,
-                               int num_channels)
+int iio_ring_buffer_register(struct iio_dev *indio_dev,
+                            const struct iio_chan_spec *channels,
+                            int num_channels)
 {
        struct iio_ring_buffer *ring = indio_dev->ring;
        int ret, i;
@@ -325,7 +325,7 @@ error_cleanup_dynamic:
 error_ret:
        return ret;
 }
-EXPORT_SYMBOL(iio_ring_buffer_register_ex);
+EXPORT_SYMBOL(iio_ring_buffer_register);
 
 void iio_ring_buffer_unregister(struct iio_dev *indio_dev)
 {
index 92c6dcc4f733d58401bdd38cef9b86c698ee6a81..77bd2761f272f5ba1325b8e3351cee503ecdd1e5 100644 (file)
@@ -780,9 +780,9 @@ static int __devinit ade7758_probe(struct spi_device *spi)
                goto error_unreg_ring_funcs;
        regdone = 1;
 
-       ret = iio_ring_buffer_register_ex(indio_dev, 0,
-                                         &ade7758_channels[0],
-                                         ARRAY_SIZE(ade7758_channels));
+       ret = iio_ring_buffer_register(indio_dev,
+                                      &ade7758_channels[0],
+                                      ARRAY_SIZE(ade7758_channels));
        if (ret) {
                dev_err(&spi->dev, "failed to initialize the ring\n");
                goto error_unreg_ring_funcs;
index 37ab4dbc0c84990a25f534dbc366b6a6cae1c730..25aacf3b89331f67f42bee8e324dcc7aa3e81432 100644 (file)
@@ -206,13 +206,12 @@ static inline int iio_scan_mask_set(struct iio_ring_buffer *ring, int bit)
        container_of(d, struct iio_ring_buffer, dev)
 
 /**
- * iio_ring_buffer_register_ex() - register the buffer with IIO core
+ * iio_ring_buffer_register() - register the buffer with IIO core
  * @indio_dev: device with the buffer to be registered
- * @id: the id of the buffer (typically 0)
  **/
-int iio_ring_buffer_register_ex(struct iio_dev *indio_dev, int id,
-                               const struct iio_chan_spec *channels,
-                               int num_channels);
+int iio_ring_buffer_register(struct iio_dev *indio_dev,
+                            const struct iio_chan_spec *channels,
+                            int num_channels);
 
 /**
  * iio_ring_buffer_unregister() - unregister the buffer from IIO core
@@ -265,10 +264,9 @@ int iio_sw_ring_preenable(struct iio_dev *indio_dev);
 
 #else /* CONFIG_IIO_RING_BUFFER */
 
-static inline int iio_ring_buffer_register_ex(struct iio_dev *indio_dev,
-                                             int id,
-                                             struct iio_chan_spec *channels,
-                                             int num_channels)
+static inline int iio_ring_buffer_register(struct iio_dev *indio_dev,
+                                          struct iio_chan_spec *channels,
+                                          int num_channels)
 {
        return 0;
 }