Skip to contentSkip to conversation

Patch "mmc: sdhci-pxav3: fix platform_data is not initialized" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Aug 8, 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: sdhci-pxav3: fix platform_data is not initialized

to the 4.1-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-platform_data-is-not-initialized.patch
and it can be found in the queue-4.1 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 9cd76049f0d90ae241f5ad80e311489824527000 Mon Sep 17 00:00:00 2001

From: Jingju Hou <[email protected]>
Date: Thu, 23 Jul 2015 17:56:23 +0800
Subject: mmc: sdhci-pxav3: fix platform_data is not initialized

From: Jingju Hou <[email protected]>

commit 9cd76049f0d90ae241f5ad80e311489824527000 upstream.

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);
     }
     ...
}
Fixes b650352dd3df("mmc: sdhci-pxa: Add device tree support")
---
 drivers/mmc/host/sdhci-pxav3.c |    1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci-pxav3.c +1 -0
@@ -411,6 +411,7 @@ static int sdhci_pxav3_probe(struct plat
 			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)

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

queue-4.1/mmc-sdhci-pxav3-fix-platform_data-is-not-initialized.patch