[3.16.y-ckt stable] Patch "mmc: sunxi: Use devm_reset_control_get_optional() for reset control" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed May 6 09:49:41 UTC 2015
This is a note to let you know that I have just added a patch titled
mmc: sunxi: Use devm_reset_control_get_optional() for reset control
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt11.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From d84753e0d715f04e3985b0e51db3fe62d818b941 Mon Sep 17 00:00:00 2001
From: Chen-Yu Tsai <wens at csie.org>
Date: Tue, 3 Mar 2015 09:44:40 +0800
Subject: mmc: sunxi: Use devm_reset_control_get_optional() for reset control
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 9e71c589e44ddf2b86f361c81e360c6b0d0354b1 upstream.
The reset control for the sunxi mmc controller is optional. Some
newer platforms (sun6i, sun8i, sun9i) have it, while older ones
(sun4i, sun5i, sun7i) don't.
Use the properly stubbed _optional version so the driver does not
fail to compile when RESET_CONTROLLER=n.
This patch also adds a check for deferred probing on the reset
control.
Signed-off-by: Chen-Yu Tsai <wens at csie.org>
Acked-by: David Lanzendörfer <david.lanzendoerfer at o2s.ch>
Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/mmc/host/sunxi-mmc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 024f67c98cdc..97823c68600a 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -909,7 +909,9 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
return PTR_ERR(host->clk_mmc);
}
- host->reset = devm_reset_control_get(&pdev->dev, "ahb");
+ host->reset = devm_reset_control_get_optional(&pdev->dev, "ahb");
+ if (PTR_ERR(host->reset) == -EPROBE_DEFER)
+ return PTR_ERR(host->reset);
ret = clk_prepare_enable(host->clk_ahb);
if (ret) {
More information about the kernel-team
mailing list