From: Greg Kroah-Hartman Date: Wed, 8 Jun 2016 00:49:37 +0000 (-0700) Subject: remove regulator-try-to-resolve-regulators-supplies-on-registration.patch X-Git-Tag: v4.4.13~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=650761fd8f328a7dcc4a9ab1326a2863899b28f9;p=thirdparty%2Fkernel%2Fstable-queue.git remove regulator-try-to-resolve-regulators-supplies-on-registration.patch from 4.4 and 4.5 queues. --- diff --git a/queue-4.4/regulator-try-to-resolve-regulators-supplies-on-registration.patch b/queue-4.4/regulator-try-to-resolve-regulators-supplies-on-registration.patch deleted file mode 100644 index 6c6c8964cf1..00000000000 --- a/queue-4.4/regulator-try-to-resolve-regulators-supplies-on-registration.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 5e3ca2b349b1e2c80b060b51bbf2af37448fad85 Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Wed, 23 Mar 2016 20:59:34 -0300 -Subject: regulator: Try to resolve regulators supplies on registration - -From: Javier Martinez Canillas - -commit 5e3ca2b349b1e2c80b060b51bbf2af37448fad85 upstream. - -Commit 6261b06de565 ("regulator: Defer lookup of supply to regulator_get") -moved the regulator supplies lookup logic from the regulators registration -to the regulators get time. - -Unfortunately, that changed the behavior of the regulator core since now a -parent supply with a child regulator marked as always-on, won't be enabled -unless a client driver attempts to get the child regulator during boot. - -This patch tries to resolve the parent supply for the already registered -regulators each time that a new regulator is registered. So the regulators -that have child regulators marked as always on will be enabled regardless -if a driver gets the child regulator or not. - -That was the behavior before the mentioned commit, since parent supplies -were looked up at regulator registration time instead of during child get. - -Since regulator_resolve_supply() checks for rdev->supply, most of the times -it will be a no-op. Errors aren't checked to keep the possible out of order -dependencies which was the motivation for the mentioned commit. - -Also, the supply being available will be enforced on regulator get anyways -in case the resolve fails on regulators registration. - -Fixes: 6261b06de565 ("regulator: Defer lookup of supply to regulator_get") -Suggested-by: Mark Brown -Signed-off-by: Javier Martinez Canillas -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/regulator/core.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/drivers/regulator/core.c -+++ b/drivers/regulator/core.c -@@ -3826,6 +3826,11 @@ static void rdev_init_debugfs(struct reg - &rdev->bypass_count); - } - -+static int regulator_register_resolve_supply(struct device *dev, void *data) -+{ -+ return regulator_resolve_supply(dev_to_rdev(dev)); -+} -+ - /** - * regulator_register - register regulator - * @regulator_desc: regulator to register -@@ -3972,6 +3977,10 @@ regulator_register(const struct regulato - } - - rdev_init_debugfs(rdev); -+ -+ /* try to resolve regulators supply since a new one was registered */ -+ class_for_each_device(®ulator_class, NULL, NULL, -+ regulator_register_resolve_supply); - out: - mutex_unlock(®ulator_list_mutex); - kfree(config); diff --git a/queue-4.4/series b/queue-4.4/series index 3eece183c3f..eedb5681607 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -43,7 +43,6 @@ rtlwifi-pci-use-dev_kfree_skb_irq-instead-of-kfree_skb-in-rtl_pci_reset_trx_ring aacraid-relinquish-cpu-during-timeout-wait.patch aacraid-fix-for-aac_command_thread-hang.patch aacraid-fix-for-kdump-driver-hang.patch -regulator-try-to-resolve-regulators-supplies-on-registration.patch hwmon-ads7828-enable-internal-reference.patch mfd-intel-lpss-save-register-context-on-suspend.patch mfd-intel_soc_pmic_core-terminate-panel-control-gpio-lookup-table-correctly.patch diff --git a/queue-4.5/regulator-try-to-resolve-regulators-supplies-on-registration.patch b/queue-4.5/regulator-try-to-resolve-regulators-supplies-on-registration.patch deleted file mode 100644 index 8eed924dc01..00000000000 --- a/queue-4.5/regulator-try-to-resolve-regulators-supplies-on-registration.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 5e3ca2b349b1e2c80b060b51bbf2af37448fad85 Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Wed, 23 Mar 2016 20:59:34 -0300 -Subject: regulator: Try to resolve regulators supplies on registration - -From: Javier Martinez Canillas - -commit 5e3ca2b349b1e2c80b060b51bbf2af37448fad85 upstream. - -Commit 6261b06de565 ("regulator: Defer lookup of supply to regulator_get") -moved the regulator supplies lookup logic from the regulators registration -to the regulators get time. - -Unfortunately, that changed the behavior of the regulator core since now a -parent supply with a child regulator marked as always-on, won't be enabled -unless a client driver attempts to get the child regulator during boot. - -This patch tries to resolve the parent supply for the already registered -regulators each time that a new regulator is registered. So the regulators -that have child regulators marked as always on will be enabled regardless -if a driver gets the child regulator or not. - -That was the behavior before the mentioned commit, since parent supplies -were looked up at regulator registration time instead of during child get. - -Since regulator_resolve_supply() checks for rdev->supply, most of the times -it will be a no-op. Errors aren't checked to keep the possible out of order -dependencies which was the motivation for the mentioned commit. - -Also, the supply being available will be enforced on regulator get anyways -in case the resolve fails on regulators registration. - -Fixes: 6261b06de565 ("regulator: Defer lookup of supply to regulator_get") -Suggested-by: Mark Brown -Signed-off-by: Javier Martinez Canillas -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/regulator/core.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/drivers/regulator/core.c -+++ b/drivers/regulator/core.c -@@ -3823,6 +3823,11 @@ static void rdev_init_debugfs(struct reg - &rdev->bypass_count); - } - -+static int regulator_register_resolve_supply(struct device *dev, void *data) -+{ -+ return regulator_resolve_supply(dev_to_rdev(dev)); -+} -+ - /** - * regulator_register - register regulator - * @regulator_desc: regulator to register -@@ -3969,6 +3974,10 @@ regulator_register(const struct regulato - } - - rdev_init_debugfs(rdev); -+ -+ /* try to resolve regulators supply since a new one was registered */ -+ class_for_each_device(®ulator_class, NULL, NULL, -+ regulator_register_resolve_supply); - out: - mutex_unlock(®ulator_list_mutex); - kfree(config); diff --git a/queue-4.5/series b/queue-4.5/series index 11bbc701f0f..7d4baef2ef8 100644 --- a/queue-4.5/series +++ b/queue-4.5/series @@ -49,7 +49,6 @@ revert-lpfc-delete-unnecessary-checks-before-the-function-call-mempool_destroy.p aacraid-relinquish-cpu-during-timeout-wait.patch aacraid-fix-for-aac_command_thread-hang.patch aacraid-fix-for-kdump-driver-hang.patch -regulator-try-to-resolve-regulators-supplies-on-registration.patch hwmon-ads7828-enable-internal-reference.patch mfd-intel-lpss-save-register-context-on-suspend.patch mfd-intel_soc_pmic_core-terminate-panel-control-gpio-lookup-table-correctly.patch