Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@huawei.com>
Link: https://patch.msgid.link/20240913013503.3754712-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jinjie Ruan and committed by
Mark Brown
ff97b9c0 a1d12410

+2 -5
+2 -5
drivers/regulator/max8973-regulator.c
··· 470 470 static int max8973_thermal_init(struct max8973_chip *mchip) 471 471 { 472 472 struct thermal_zone_device *tzd; 473 - struct irq_data *irq_data; 474 - unsigned long irq_flags = 0; 473 + unsigned long irq_flags; 475 474 int ret; 476 475 477 476 if (mchip->id != MAX77621) ··· 488 489 if (mchip->irq <= 0) 489 490 return 0; 490 491 491 - irq_data = irq_get_irq_data(mchip->irq); 492 - if (irq_data) 493 - irq_flags = irqd_get_trigger_type(irq_data); 492 + irq_flags = irq_get_trigger_type(mchip->irq); 494 493 495 494 ret = devm_request_threaded_irq(mchip->dev, mchip->irq, NULL, 496 495 max8973_thermal_irq,