summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2024-09-01 14:59:48 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-09-30 09:20:59 +0100
commita9facbf521e7b02b2123ae141fc21ff273ebacf3 (patch)
treeb918abd736ff84cfd6e1aafcd2e413085fcd60cc
parente200fa767f2301a5ee39bc6c17d576a18965f6df (diff)
downloadlwn-a9facbf521e7b02b2123ae141fc21ff273ebacf3.tar.gz
lwn-a9facbf521e7b02b2123ae141fc21ff273ebacf3.zip
iio: light: st_uvis25: use irq_get_trigger_type()
Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20240901135950.797396-14-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/light/st_uvis25_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/light/st_uvis25_core.c b/drivers/iio/light/st_uvis25_core.c
index fba3997574bb..f1fc8cb6f69a 100644
--- a/drivers/iio/light/st_uvis25_core.c
+++ b/drivers/iio/light/st_uvis25_core.c
@@ -174,8 +174,7 @@ static int st_uvis25_allocate_trigger(struct iio_dev *iio_dev)
unsigned long irq_type;
int err;
- irq_type = irqd_get_trigger_type(irq_get_irq_data(hw->irq));
-
+ irq_type = irq_get_trigger_type(hw->irq);
switch (irq_type) {
case IRQF_TRIGGER_HIGH:
case IRQF_TRIGGER_RISING: