diff mbox series

[03/15] iio: adc: ti-ads1015: use irq_get_trigger_type()

Message ID 20240901135950.797396-4-jic23@kernel.org (mailing list archive)
State Accepted
Headers show
Series IIO: use irq_get_trigger_type() instead of opencoding. | expand

Commit Message

Jonathan Cameron Sept. 1, 2024, 1:59 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Use irq_get_trigger_type() to replace getting the irq data then the
type in two steps.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/adc/ti-ads1015.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Sept. 2, 2024, 11:42 a.m. UTC | #1
On Sun, Sep 01, 2024 at 02:59:38PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Use irq_get_trigger_type() to replace getting the irq data then the
> type in two steps.

...

>  		unsigned long irq_trig =
> -			irqd_get_trigger_type(irq_get_irq_data(client->irq));
> +			irq_get_trigger_type(client->irq);

Now a single line?
diff mbox series

Patch

diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
index ca432c49eab1..70f60d018049 100644
--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -1033,7 +1033,7 @@  static int ads1015_probe(struct i2c_client *client)
 
 	if (client->irq && chip->has_comparator) {
 		unsigned long irq_trig =
-			irqd_get_trigger_type(irq_get_irq_data(client->irq));
+			irq_get_trigger_type(client->irq);
 		unsigned int cfg_comp_mask = ADS1015_CFG_COMP_QUE_MASK |
 			ADS1015_CFG_COMP_LAT_MASK | ADS1015_CFG_COMP_POL_MASK;
 		unsigned int cfg_comp =