Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354207
b: refs/heads/master
c: 94f3c7c
h: refs/heads/master
i:
  354205: 48379d9
  354203: 34ee4fa
  354199: 97b4da0
  354191: e19b331
  354175: 939cfc5
v: v3
  • Loading branch information
Jonathan Cameron committed Jan 26, 2013
1 parent 2a4a73a commit bcdbc1c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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: 032658a446145b9e6af7f90521179a9e0111b546
refs/heads/master: 94f3c7cd829319317a95649cd43abb07c188c191
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/meter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ config ADE7758
tristate "Analog Devices ADE7758 Poly Phase Multifunction Energy Metering IC Driver"
depends on SPI
select IIO_TRIGGER if IIO_BUFFER
select IIO_SW_RING if IIO_BUFFER
select IIO_KFIFO_BUF if IIO_BUFFER
help
Say yes here to build support for Analog Devices ADE7758 Polyphase
Multifunction Energy Metering IC with Per Phase Information Driver.
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/iio/meter/ade7758_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <asm/unaligned.h>

#include <linux/iio/iio.h>
#include "../ring_sw.h"
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger_consumer.h>
#include "ade7758.h"

Expand Down Expand Up @@ -119,15 +119,15 @@ static const struct iio_buffer_setup_ops ade7758_ring_setup_ops = {
void ade7758_unconfigure_ring(struct iio_dev *indio_dev)
{
iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer);
iio_kfifo_free(indio_dev->buffer);
}

int ade7758_configure_ring(struct iio_dev *indio_dev)
{
struct ade7758_state *st = iio_priv(indio_dev);
int ret = 0;

indio_dev->buffer = iio_sw_rb_allocate(indio_dev);
indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) {
ret = -ENOMEM;
return ret;
Expand All @@ -143,7 +143,7 @@ int ade7758_configure_ring(struct iio_dev *indio_dev)
indio_dev->id);
if (indio_dev->pollfunc == NULL) {
ret = -ENOMEM;
goto error_iio_sw_rb_free;
goto error_iio_kfifo_free;
}

indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
Expand Down Expand Up @@ -183,8 +183,8 @@ int ade7758_configure_ring(struct iio_dev *indio_dev)

return 0;

error_iio_sw_rb_free:
iio_sw_rb_free(indio_dev->buffer);
error_iio_kfifo_free:
iio_kfifo_free(indio_dev->buffer);
return ret;
}

Expand Down

0 comments on commit bcdbc1c

Please sign in to comment.