From d4a03336da29704e3445ecc7fc23ee0c268e246e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 20 Nov 2018 09:51:09 +0100 Subject: [PATCH] drop clk-s2mps11-fix-matching-when-built-as-module-and-dt-node-contains-compatible.patch from 3.18 --- ...dule-and-dt-node-contains-compatible.patch | 77 ------------------- queue-3.18/series | 1 - 2 files changed, 78 deletions(-) delete mode 100644 queue-3.18/clk-s2mps11-fix-matching-when-built-as-module-and-dt-node-contains-compatible.patch diff --git a/queue-3.18/clk-s2mps11-fix-matching-when-built-as-module-and-dt-node-contains-compatible.patch b/queue-3.18/clk-s2mps11-fix-matching-when-built-as-module-and-dt-node-contains-compatible.patch deleted file mode 100644 index cd0c03a7e41..00000000000 --- a/queue-3.18/clk-s2mps11-fix-matching-when-built-as-module-and-dt-node-contains-compatible.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 8985167ecf57f97061599a155bb9652c84ea4913 Mon Sep 17 00:00:00 2001 -From: Krzysztof Kozlowski -Date: Wed, 29 Aug 2018 21:20:10 +0200 -Subject: clk: s2mps11: Fix matching when built as module and DT node contains compatible - -From: Krzysztof Kozlowski - -commit 8985167ecf57f97061599a155bb9652c84ea4913 upstream. - -When driver is built as module and DT node contains clocks compatible -(e.g. "samsung,s2mps11-clk"), the module will not be autoloaded because -module aliases won't match. - -The modalias from uevent: of:NclocksTCsamsung,s2mps11-clk -The modalias from driver: platform:s2mps11-clk - -The devices are instantiated by parent's MFD. However both Device Tree -bindings and parent define the compatible for clocks devices. In case -of module matching this DT compatible will be used. - -The issue will not happen if this is a built-in (no need for module -matching) or when clocks DT node does not contain compatible (not -correct from bindings perspective but working for driver). - -Note when backporting to stable kernels: adjust the list of device ID -entries. - -Cc: -Fixes: 53c31b3437a6 ("mfd: sec-core: Add of_compatible strings for clock MFD cells") -Signed-off-by: Krzysztof Kozlowski -Acked-by: Stephen Boyd -Signed-off-by: Stephen Boyd -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/clk/clk-s2mps11.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - ---- a/drivers/clk/clk-s2mps11.c -+++ b/drivers/clk/clk-s2mps11.c -@@ -285,6 +285,36 @@ static const struct platform_device_id s - }; - MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); - -+#ifdef CONFIG_OF -+/* -+ * Device is instantiated through parent MFD device and device matching is done -+ * through platform_device_id. -+ * -+ * However if device's DT node contains proper clock compatible and driver is -+ * built as a module, then the *module* matching will be done trough DT aliases. -+ * This requires of_device_id table. In the same time this will not change the -+ * actual *device* matching so do not add .of_match_table. -+ */ -+static const struct of_device_id s2mps11_dt_match[] = { -+ { -+ .compatible = "samsung,s2mps11-clk", -+ .data = (void *)S2MPS11X, -+ }, { -+ .compatible = "samsung,s2mps13-clk", -+ .data = (void *)S2MPS13X, -+ }, { -+ .compatible = "samsung,s2mps14-clk", -+ .data = (void *)S2MPS14X, -+ }, { -+ .compatible = "samsung,s5m8767-clk", -+ .data = (void *)S5M8767X, -+ }, { -+ /* Sentinel */ -+ }, -+}; -+MODULE_DEVICE_TABLE(of, s2mps11_dt_match); -+#endif -+ - static struct platform_driver s2mps11_clk_driver = { - .driver = { - .name = "s2mps11-clk", diff --git a/queue-3.18/series b/queue-3.18/series index 35a097f2bdd..d0592f226fc 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -60,7 +60,6 @@ media-tvp5150-fix-width-alignment-during-set_selection.patch 9p-clear-dangling-pointers-in-p9stat_free.patch cdrom-fix-improper-type-cast-which-can-leat-to-information-leak.patch xtensa-fix-boot-parameters-address-translation.patch -clk-s2mps11-fix-matching-when-built-as-module-and-dt-node-contains-compatible.patch libceph-bump-ceph_msg_max_data_len.patch mach64-fix-display-corruption-on-big-endian-machines.patch mach64-fix-image-corruption-due-to-reading-accelerator-registers.patch -- 2.47.2