From 71323f27d898f71e0182a64d64aba00b1730941d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 4 Mar 2024 11:53:26 +0100 Subject: [PATCH] 6.7-stable patches added patches: mfd-twl6030-irq-revert-to-use-of_match_device.patch --- ...30-irq-revert-to-use-of_match_device.patch | 62 +++++++++++++++++++ queue-6.7/series | 1 + 2 files changed, 63 insertions(+) create mode 100644 queue-6.7/mfd-twl6030-irq-revert-to-use-of_match_device.patch diff --git a/queue-6.7/mfd-twl6030-irq-revert-to-use-of_match_device.patch b/queue-6.7/mfd-twl6030-irq-revert-to-use-of_match_device.patch new file mode 100644 index 00000000000..40bc621f10b --- /dev/null +++ b/queue-6.7/mfd-twl6030-irq-revert-to-use-of_match_device.patch @@ -0,0 +1,62 @@ +From 7a29fa05aeca2c16193f00a883c56ffc7c25b6c5 Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Sun, 29 Oct 2023 13:48:43 +0200 +Subject: mfd: twl6030-irq: Revert to use of_match_device() + +From: Peter Ujfalusi + +commit 7a29fa05aeca2c16193f00a883c56ffc7c25b6c5 upstream. + +The core twl chip is probed via i2c and the dev->driver->of_match_table is +NULL, causing the driver to fail to probe. + +This partially reverts: + + commit 1e0c866887f4 ("mfd: Use device_get_match_data() in a bunch of drivers") + +Fixes: 1e0c866887f4 ("mfd: Use device_get_match_data() in a bunch of drivers") +Signed-off-by: Peter Ujfalusi +Link: https://lore.kernel.org/r/20231029114843.15553-1-peter.ujfalusi@gmail.com +Signed-off-by: Lee Jones +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mfd/twl6030-irq.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/mfd/twl6030-irq.c ++++ b/drivers/mfd/twl6030-irq.c +@@ -24,10 +24,10 @@ + #include + #include + #include +-#include + #include + #include + #include ++#include + + #include "twl-core.h" + +@@ -368,10 +368,10 @@ int twl6030_init_irq(struct device *dev, + int nr_irqs; + int status; + u8 mask[3]; +- const int *irq_tbl; ++ const struct of_device_id *of_id; + +- irq_tbl = device_get_match_data(dev); +- if (!irq_tbl) { ++ of_id = of_match_device(twl6030_of_match, dev); ++ if (!of_id || !of_id->data) { + dev_err(dev, "Unknown TWL device model\n"); + return -EINVAL; + } +@@ -409,7 +409,7 @@ int twl6030_init_irq(struct device *dev, + + twl6030_irq->pm_nb.notifier_call = twl6030_irq_pm_notifier; + atomic_set(&twl6030_irq->wakeirqs, 0); +- twl6030_irq->irq_mapping_tbl = irq_tbl; ++ twl6030_irq->irq_mapping_tbl = of_id->data; + + twl6030_irq->irq_domain = + irq_domain_add_linear(node, nr_irqs, diff --git a/queue-6.7/series b/queue-6.7/series index c6e4a3f950f..0a6c76a17d9 100644 --- a/queue-6.7/series +++ b/queue-6.7/series @@ -128,3 +128,4 @@ mptcp-fix-snd_wnd-initialization-for-passive-socket.patch mptcp-fix-potential-wake-up-event-loss.patch mptcp-fix-double-free-on-socket-dismantle.patch mptcp-fix-possible-deadlock-in-subflow-diag.patch +mfd-twl6030-irq-revert-to-use-of_match_device.patch -- 2.47.3