mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mmc: sdhci-pxav3: fix platform_data is not initialized
pdev->dev.platform_data is not initialized if match is true in function
sdhci_pxav3_probe. Just local variable pdata is assigned the return value
from function pxav3_get_mmc_pdata().
static int sdhci_pxav3_probe(struct platform_device *pdev) {
struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data;
...
if (match) {
ret = mmc_of_parse(host->mmc);
if (ret)
goto err_of_parse;
sdhci_get_of_property(pdev);
pdata = pxav3_get_mmc_pdata(dev);
}
...
}
Signed-off-by: Jingju Hou <[email protected]>
Fixes: b650352dd3df("mmc: sdhci-pxa: Add device tree support")
Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
parent
cae13e792f
commit
9cd76049f0
1 changed files with 1 additions and 0 deletions
|
|
@ -411,6 +411,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
|
|||
goto err_of_parse;
|
||||
sdhci_get_of_property(pdev);
|
||||
pdata = pxav3_get_mmc_pdata(dev);
|
||||
pdev->dev.platform_data = pdata;
|
||||
} else if (pdata) {
|
||||
/* on-chip device */
|
||||
if (pdata->flags & PXA_FLAG_CARD_PERMANENT)
|
||||
|
|
|
|||
Loading…
Reference in a new issue