Home
last modified time | relevance | path

Searched hist:"14460 dbaf7a5a0488963fdb8232ad5c8a8cca7b7" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/mmc/host/
H A Dsdhci-pxav3.cdiff 14460dbaf7a5a0488963fdb8232ad5c8a8cca7b7 Wed Jan 28 05:54:12 CST 2015 Jisheng Zhang <jszhang@marvell.com> mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles

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 <jszhang@marvell.com>
Cc: <stable@vger.kernel.org> # v3.6+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>