diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2015-01-22 09:08:03 +0530 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-01-27 18:49:57 +0000 |
commit | eec06b8c532588fb114fcbd9724f3c9fbdfe10c9 (patch) | |
tree | b849c48c6acbb0137132d0873c6a8ceee22fead6 /drivers/iio | |
parent | b3e9ad703bef139fbcbb6423f4bafe3f89c97b00 (diff) | |
download | blackbird-op-linux-eec06b8c532588fb114fcbd9724f3c9fbdfe10c9.tar.gz blackbird-op-linux-eec06b8c532588fb114fcbd9724f3c9fbdfe10c9.zip |
imu: inv_mpu6050: use devm_request_irq
This patch use the devres API for requesting an IRQ.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c index c827d21f7381..ab8c85a2a5f8 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c @@ -124,10 +124,11 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev) ret = -ENOMEM; goto error_ret; } - ret = request_irq(st->client->irq, &iio_trigger_generic_data_rdy_poll, - IRQF_TRIGGER_RISING, - "inv_mpu", - st->trig); + ret = devm_request_irq(&indio_dev->dev, st->client->irq, + &iio_trigger_generic_data_rdy_poll, + IRQF_TRIGGER_RISING, + "inv_mpu", + st->trig); if (ret) goto error_ret; st->trig->dev.parent = &st->client->dev; @@ -135,13 +136,11 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev) iio_trigger_set_drvdata(st->trig, indio_dev); ret = iio_trigger_register(st->trig); if (ret) - goto error_free_irq; + goto error_ret; indio_dev->trig = iio_trigger_get(st->trig); return 0; -error_free_irq: - free_irq(st->client->irq, st->trig); error_ret: return ret; } @@ -149,5 +148,4 @@ error_ret: void inv_mpu6050_remove_trigger(struct inv_mpu6050_state *st) { iio_trigger_unregister(st->trig); - free_irq(st->client->irq, st->trig); } |