[PATCH -next] regulator: max8973: Use irq_get_trigger_type() helper

Jinjie Ruan posted 1 patch 2 months, 2 weeks ago
drivers/regulator/max8973-regulator.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
[PATCH -next] regulator: max8973: Use irq_get_trigger_type() helper
Posted by Jinjie Ruan 2 months, 2 weeks ago
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@huawei.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
Re: [PATCH -next] regulator: max8973: Use irq_get_trigger_type() helper
Posted by Mark Brown 2 months, 2 weeks ago
On Fri, 13 Sep 2024 09:35:03 +0800, Jinjie Ruan wrote:
> 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.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: max8973: Use irq_get_trigger_type() helper
      commit: ff97b9c0df585d14c4c6b9c4cdcbeba43f7b885a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark