]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Nov 2025 23:00:41 +0000 (08:00 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Nov 2025 23:00:41 +0000 (08:00 +0900)
added patches:
mfd-kempld-switch-back-to-earlier-init-behavior.patch

queue-6.12/mfd-kempld-switch-back-to-earlier-init-behavior.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/mfd-kempld-switch-back-to-earlier-init-behavior.patch b/queue-6.12/mfd-kempld-switch-back-to-earlier-init-behavior.patch
new file mode 100644 (file)
index 0000000..639c069
--- /dev/null
@@ -0,0 +1,71 @@
+From 309e65d151ab9be1e7b01d822880cd8c4e611dff Mon Sep 17 00:00:00 2001
+From: "Heijligen, Thomas" <thomas.heijligen@secunet.com>
+Date: Thu, 31 Jul 2025 14:45:00 +0000
+Subject: mfd: kempld: Switch back to earlier ->init() behavior
+
+From: Heijligen, Thomas <thomas.heijligen@secunet.com>
+
+commit 309e65d151ab9be1e7b01d822880cd8c4e611dff upstream.
+
+Commit 9e36775c22c7 ("mfd: kempld: Remove custom DMI matching code")
+removes the ability to load the driver if no matching system DMI data
+is found. Before this commit the driver could be loaded using
+alternative methods such as ACPI or `force_device_id` in the absence
+of a matching system DMI entry.
+
+Restore this ability while keeping the refactored
+`platform_device_info` table.
+
+Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Link: https://lore.kernel.org/r/7d2c7e92253d851194a781720051536cca2722b8.camel@secunet.com
+Signed-off-by: Lee Jones <lee@kernel.org>
+Cc: Michael Brunner <Michael.Brunner@jumptec.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mfd/kempld-core.c |   32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+--- a/drivers/mfd/kempld-core.c
++++ b/drivers/mfd/kempld-core.c
+@@ -779,22 +779,26 @@ MODULE_DEVICE_TABLE(dmi, kempld_dmi_tabl
+ static int __init kempld_init(void)
+ {
+       const struct dmi_system_id *id;
+-      int ret = -ENODEV;
+-      for (id = dmi_first_match(kempld_dmi_table); id; id = dmi_first_match(id + 1)) {
+-              /* Check, if user asked for the exact device ID match */
+-              if (force_device_id[0] && !strstr(id->ident, force_device_id))
+-                      continue;
+-
+-              ret = kempld_create_platform_device(&kempld_platform_data_generic);
+-              if (ret)
+-                      continue;
+-
+-              break;
++      /*
++       * This custom DMI iteration allows the driver to be initialized in three ways:
++       * - When a forced_device_id string matches any ident in the kempld_dmi_table,
++       *   regardless of whether the DMI device is present in the system dmi table.
++       * - When a matching entry is present in the DMI system tabe.
++       * - Through alternative mechanisms like ACPI.
++       */
++      if (force_device_id[0]) {
++              for (id = kempld_dmi_table; id->matches[0].slot != DMI_NONE; id++)
++                      if (strstr(id->ident, force_device_id))
++                              if (!kempld_create_platform_device(&kempld_platform_data_generic))
++                                      break;
++              if (id->matches[0].slot == DMI_NONE)
++                      return -ENODEV;
++      } else {
++              for (id = dmi_first_match(kempld_dmi_table); id; id = dmi_first_match(id+1))
++                      if (kempld_create_platform_device(&kempld_platform_data_generic))
++                              break;
+       }
+-      if (ret)
+-              return ret;
+-
+       return platform_driver_register(&kempld_driver);
+ }
index 994974f52215f40a4a44f29475652b790f748d03..c77e3861926b8c25b267a2c9a39bc4b5081619de 100644 (file)
@@ -81,3 +81,4 @@ mptcp-move-the-whole-rx-path-under-msk-socket-lock-protection.patch
 mptcp-cleanup-mem-accounting.patch
 mptcp-leverage-skb-deferral-free.patch
 mptcp-fix-msg_peek-stream-corruption.patch
+mfd-kempld-switch-back-to-earlier-init-behavior.patch