Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268156
b: refs/heads/master
c: c009f7e
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 5c6564e commit 022b71e
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6446e9cd2c1658f0afe856dfbe0b4623db39fb46
refs/heads/master: c009f7e42617bd52b61a35de621cd1deda08042b
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/adis16201_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/adis16203_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/adis16204_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/adis16209_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/adis16240_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/lis3l02dq_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/accel/sca3000_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7192.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7298_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7476_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7606_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7793.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7887_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad799x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/max1363_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/gyro/adis16260_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/impedance-analyzer/ad5933.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/imu/adis16400_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/iio/industrialio-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -325,7 +325,7 @@ int iio_ring_buffer_register_ex(struct iio_dev *indio_dev, int id,
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)
{
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/meter/ade7758_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 7 additions & 9 deletions trunk/drivers/staging/iio/ring_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 022b71e

Please sign in to comment.