From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Javier Martinez Canillas <javier@osg.samsung.com>,
linux-arm-kernel@lists.infradead.org,
Kukjin Kim <kgene@kernel.org>,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Lukasz Majewski <l.majewski@samsung.com>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>
Subject: [PATCH 3/3] thermal: exynos: Defer probe if vtmu is present but not registered
Date: Thu, 18 Feb 2016 15:19:11 -0300 [thread overview]
Message-ID: <1455819551-4666-4-git-send-email-javier@osg.samsung.com> (raw)
In-Reply-To: <1455819551-4666-1-git-send-email-javier@osg.samsung.com>
The driver doesn't check if the regulator_get_optional return value is
-EPROBE_DEFER so it will wrongly assume that the regulator couldn't be
found just because the regulator driver wasn't registered yet, i.e:
exynos-tmu 10060000.tmu: Regulator node (vtmu) not found
In this case the return value should be propagated to allow the driver
probe function to be deferred until the regulator driver is registered.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/thermal/samsung/exynos_tmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index f4f36bba7be9..f3ce94ec73b5 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1318,6 +1318,8 @@ static int exynos_tmu_probe(struct platform_device *pdev)
return ret;
}
} else {
+ if (PTR_ERR(data->regulator) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
dev_info(&pdev->dev, "Regulator node (vtmu) not found\n");
}
--
2.5.0
next prev parent reply other threads:[~2016-02-18 18:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 18:19 [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling Javier Martinez Canillas
2016-02-18 18:19 ` [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding Javier Martinez Canillas
2016-02-19 0:26 ` Krzysztof Kozlowski
2016-02-23 20:26 ` Rob Herring
2016-03-08 21:07 ` Eduardo Valentin
2016-03-08 21:30 ` Javier Martinez Canillas
2016-03-08 21:51 ` Eduardo Valentin
2016-02-18 18:19 ` [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu Javier Martinez Canillas
2016-02-19 0:33 ` Krzysztof Kozlowski
2016-02-18 18:19 ` Javier Martinez Canillas [this message]
2016-02-19 0:37 ` [PATCH 3/3] thermal: exynos: Defer probe if vtmu is present but not registered Krzysztof Kozlowski
2016-02-19 4:20 ` Andi Shyti
2016-02-19 4:25 ` Krzysztof Kozlowski
2016-02-19 4:29 ` [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling Andi Shyti
2016-03-08 13:30 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455819551-4666-4-git-send-email-javier@osg.samsung.com \
--to=javier@osg.samsung.com \
--cc=edubezval@gmail.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=l.majewski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®