[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240913013503.3754712-1-ruanjinjie@huawei.com>
Date: Fri, 13 Sep 2024 09:35:03 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <lgirdwood@...il.com>, <broonie@...nel.org>,
<linux-kernel@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH -next] regulator: max8973: Use irq_get_trigger_type() helper
Use irq_get_trigger_type() to replace irq_get_irq_data() and then
irqd_get_trigger_type(), if the irq data is NULL it will return 0.
Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
---
drivers/regulator/max8973-regulator.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 96ca146281d6..f68caa07f546 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -470,8 +470,7 @@ static const struct thermal_zone_device_ops max77621_tz_ops = {
static int max8973_thermal_init(struct max8973_chip *mchip)
{
struct thermal_zone_device *tzd;
- struct irq_data *irq_data;
- unsigned long irq_flags = 0;
+ unsigned long irq_flags;
int ret;
if (mchip->id != MAX77621)
@@ -489,9 +488,7 @@ static int max8973_thermal_init(struct max8973_chip *mchip)
if (mchip->irq <= 0)
return 0;
- irq_data = irq_get_irq_data(mchip->irq);
- if (irq_data)
- irq_flags = irqd_get_trigger_type(irq_data);
+ irq_flags = irq_get_trigger_type(mchip->irq);
ret = devm_request_threaded_irq(mchip->dev, mchip->irq, NULL,
max8973_thermal_irq,
--
2.34.1
Powered by blists - more mailing lists