summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/accel/lis3l02dq_ring.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-09-28 22:36:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-10-19 16:19:07 +0100
commit65cb587d7058441c8c910e8766ee86538c7274d8 (patch)
tree334b98fc8fac395e7430fca7d4029efd1312868a /drivers/staging/iio/accel/lis3l02dq_ring.c
parent48edf8eb53daf98b1fc4498ac54b27c08b955248 (diff)
staging/iio/lis3l02dq: fix building without irq_to_gpio
The driver has not been building for some time after the irq_to_gpio function has been removed from the kernel. The only board in the upstream kernel that provides this device is the "Stargate 2", which is also maintained by Jonathan Cameron. Rather than working around the problem by adding new platform data for this driver, this patch uses the of_gpio framework to get to the gpio number. However, the stargate2 code does not (yet) use DT based probing, so it is still broken, but at least building allyesconfig works again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq_ring.c')
-rw-r--r--drivers/staging/iio/accel/lis3l02dq_ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index fa4190d96247..13c0b4bd5baa 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -263,7 +263,7 @@ static int lis3l02dq_trig_try_reen(struct iio_trigger *trig)
/* If gpio still high (or high again)
* In theory possible we will need to do this several times */
for (i = 0; i < 5; i++)
- if (gpio_get_value(irq_to_gpio(st->us->irq)))
+ if (gpio_get_value(st->gpio))
lis3l02dq_read_all(indio_dev, NULL);
else
break;