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

    mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles

to the 3.19-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-sdhci-pxav3-fix-setting-of-pdata-clk_delay_cycles.patch
and it can be found in the queue-3.19 subdirectory.

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


>From 14460dbaf7a5a0488963fdb8232ad5c8a8cca7b7 Mon Sep 17 00:00:00 2001
From: Jisheng Zhang <[email protected]>
Date: Wed, 28 Jan 2015 19:54:12 +0800
Subject: mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles

From: Jisheng Zhang <[email protected]>

commit 14460dbaf7a5a0488963fdb8232ad5c8a8cca7b7 upstream.

Current code checks "clk_delay_cycles > 0" to know whether the optional
"mrvl,clk_delay_cycles" is set or not. But of_property_read_u32() doesn't
touch clk_delay_cycles if the property is not set. And type of
clk_delay_cycles is u32, so we may always set pdata->clk_delay_cycles as a
random value.

This patch fix this problem by check the return value of of_property_read_u32()
to know whether the optional clk-delay-cycles is set or not.

Signed-off-by: Jisheng Zhang <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/mmc/host/sdhci-pxav3.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -268,8 +268,8 @@ static struct sdhci_pxa_platdata *pxav3_
        if (!pdata)
                return NULL;
 
-       of_property_read_u32(np, "mrvl,clk-delay-cycles", &clk_delay_cycles);
-       if (clk_delay_cycles > 0)
+       if (!of_property_read_u32(np, "mrvl,clk-delay-cycles",
+                                 &clk_delay_cycles))
                pdata->clk_delay_cycles = clk_delay_cycles;
 
        return pdata;


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

queue-3.19/mmc-sdhci-pxav3-fix-race-between-runtime-pm-and-irq.patch
queue-3.19/mmc-sdhci-pxav3-fix-setting-of-pdata-clk_delay_cycles.patch
queue-3.19/mmc-sdhci-pxav3-fix-unbalanced-clock-issues-during-probe.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to