staging: iio: push the main buffer chrdev down to the top level.
[deliverable/linux.git] / drivers / staging / iio / impedance-analyzer / ad5933.c
index acc0e69cb58874a05e02521e5a2f7e96aea0ae8b..8668291ffdc76b753aaef863027df020091dc5f6 100644 (file)
@@ -733,9 +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->ring, 0,
-                                         &ad5933_channels[1],
-                                         2);
+       ret = iio_ring_buffer_register_ex(indio_dev, 0, &ad5933_channels[1], 2);
        if (ret)
                goto error_unreg_ring;
 
@@ -750,7 +748,7 @@ static int __devinit ad5933_probe(struct i2c_client *client,
        return 0;
 
 error_uninitialize_ring:
-       iio_ring_buffer_unregister(indio_dev->ring);
+       iio_ring_buffer_unregister(indio_dev);
 error_unreg_ring:
        iio_sw_rb_free(indio_dev->ring);
 error_disable_reg:
@@ -773,7 +771,7 @@ static __devexit int ad5933_remove(struct i2c_client *client)
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ad5933_state *st = iio_priv(indio_dev);
 
-       iio_ring_buffer_unregister(indio_dev->ring);
+       iio_ring_buffer_unregister(indio_dev);
        iio_sw_rb_free(indio_dev->ring);
        if (!IS_ERR(st->reg)) {
                regulator_disable(st->reg);
This page took 0.025264 seconds and 5 git commands to generate.