Skip to contentSkip to conversation

Patch "mmc: sunxi: Use devm_reset_control_get_optional() for reset control" has been added to the 4.0-stable tree

PATCH [email protected] 1 participant 1 message May 2, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mmc: sunxi: Use devm_reset_control_get_optional() for reset control

to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mmc-sunxi-use-devm_reset_control_get_optional-for-reset-control.patch
and it can be found in the queue-4.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 9e71c589e44ddf2b86f361c81e360c6b0d0354b1 Mon Sep 17 00:00:00 2001

From: Chen-Yu Tsai <[email protected]>
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

From: Chen-Yu Tsai <[email protected]>

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.

---
 drivers/mmc/host/sunxi-mmc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/host/sunxi-mmc.c +3 -1
@@ -930,7 +930,9 @@ static int sunxi_mmc_resource_request(st
 		return PTR_ERR(host->clk_sample);
 	}
 
-	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) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.0/mmc-sunxi-use-devm_reset_control_get_optional-for-reset-control.patch