summaryrefslogtreecommitdiff
path: root/drivers/mfd/twl6030-irq.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-17 23:36:10 +0300
committerLee Jones <lee@kernel.org>2023-11-01 13:02:17 +0300
commit830fafce06e6fc2e63e141799833f7c7a73cf62b (patch)
treed9b5f379a230da54e8a8b70c1095c2e65d72acbb /drivers/mfd/twl6030-irq.c
parent15d71e678ec14ce26f7a271fef363e5c04ec24bf (diff)
downloadlinux-830fafce06e6fc2e63e141799833f7c7a73cf62b.tar.xz
mfd: Use device_get_match_data() in a bunch of drivers
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231017203612.2701060-1-robh@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/twl6030-irq.c')
-rw-r--r--drivers/mfd/twl6030-irq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 3c03681c124c..f9fce8408c2c 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -24,10 +24,10 @@
#include <linux/kthread.h>
#include <linux/mfd/twl.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/suspend.h>
#include <linux/of.h>
#include <linux/irqdomain.h>
-#include <linux/of_device.h>
#include "twl-core.h"
@@ -368,10 +368,10 @@ int twl6030_init_irq(struct device *dev, int irq_num)
int nr_irqs;
int status;
u8 mask[3];
- const struct of_device_id *of_id;
+ const int *irq_tbl;
- of_id = of_match_device(twl6030_of_match, dev);
- if (!of_id || !of_id->data) {
+ irq_tbl = device_get_match_data(dev);
+ if (!irq_tbl) {
dev_err(dev, "Unknown TWL device model\n");
return -EINVAL;
}
@@ -409,7 +409,7 @@ int twl6030_init_irq(struct device *dev, int irq_num)
twl6030_irq->pm_nb.notifier_call = twl6030_irq_pm_notifier;
atomic_set(&twl6030_irq->wakeirqs, 0);
- twl6030_irq->irq_mapping_tbl = of_id->data;
+ twl6030_irq->irq_mapping_tbl = irq_tbl;
twl6030_irq->irq_domain =
irq_domain_add_linear(node, nr_irqs,