Title: [9365] trunk/drivers/staging/iio/accel/sca3000_ring.c: merge from upstream: staging: iio: sca3000 fix bug due to scan_element directory move.
- Revision
- 9365
- Author
- vapier
- Date
- 2010-10-24 16:52:04 -0400 (Sun, 24 Oct 2010)
Log Message
merge from upstream: staging: iio: sca3000 fix bug due to scan_element directory move.
From: Jonathan Cameron <[email protected]>
The device found passed to the attr functions is that of the ring
buffer, not the the iio_dev so we need to bounce through one more
hop to get the right address.
Reported-by: Michael Hennerich <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Modified Paths
Diff
Modified: trunk/drivers/staging/iio/accel/sca3000_ring.c (9364 => 9365)
--- trunk/drivers/staging/iio/accel/sca3000_ring.c 2010-10-24 20:52:00 UTC (rev 9364)
+++ trunk/drivers/staging/iio/accel/sca3000_ring.c 2010-10-24 20:52:04 UTC (rev 9365)
@@ -138,7 +138,8 @@
{
int len = 0, ret;
u8 *rx;
- struct iio_dev *indio_dev = dev_get_drvdata(dev);
+ struct iio_ring_buffer *ring = dev_get_drvdata(dev);
+ struct iio_dev *indio_dev = ring->indio_dev;
struct sca3000_state *st = indio_dev->dev_data;
mutex_lock(&st->lock);
@@ -168,7 +169,8 @@
const char *buf,
size_t len)
{
- struct iio_dev *indio_dev = dev_get_drvdata(dev);
+ struct iio_ring_buffer *ring = dev_get_drvdata(dev);
+ struct iio_dev *indio_dev = ring->indio_dev;
struct sca3000_state *st = indio_dev->dev_data;
int ret;
u8 *rx;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits