From b6066f8478ab118280df8f100ba8c19ede76ca23 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Fri, 15 Oct 2010 12:21:02 +0200 Subject: [PATCH] --- yaml --- r: 219028 b: refs/heads/master c: 012994f4fa5fc7663b51fa921c85c0a352339b24 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/sdhci-pltfm.c | 8 +++++--- trunk/include/linux/mmc/sdhci-pltfm.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index c4ffefefcbb2..5796fd7dedbe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2dfb579c7da171f6153cd58e8fbf7dcfe684778d +refs/heads/master: 012994f4fa5fc7663b51fa921c85c0a352339b24 diff --git a/trunk/drivers/mmc/host/sdhci-pltfm.c b/trunk/drivers/mmc/host/sdhci-pltfm.c index 685202be2778..00e8a8ab638e 100644 --- a/trunk/drivers/mmc/host/sdhci-pltfm.c +++ b/trunk/drivers/mmc/host/sdhci-pltfm.c @@ -52,15 +52,17 @@ static struct sdhci_ops sdhci_pltfm_ops = { static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) { - struct sdhci_pltfm_data *pdata = pdev->dev.platform_data; const struct platform_device_id *platid = platform_get_device_id(pdev); + struct sdhci_pltfm_data *pdata; struct sdhci_host *host; struct sdhci_pltfm_host *pltfm_host; struct resource *iomem; int ret; - if (!pdata && platid && platid->driver_data) + if (platid && platid->driver_data) pdata = (void *)platid->driver_data; + else + pdata = pdev->dev.platform_data; iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!iomem) { @@ -109,7 +111,7 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) } if (pdata && pdata->init) { - ret = pdata->init(host); + ret = pdata->init(host, pdata); if (ret) goto err_plat_init; } diff --git a/trunk/include/linux/mmc/sdhci-pltfm.h b/trunk/include/linux/mmc/sdhci-pltfm.h index 0239bd70241e..548d59d404cb 100644 --- a/trunk/include/linux/mmc/sdhci-pltfm.h +++ b/trunk/include/linux/mmc/sdhci-pltfm.h @@ -28,7 +28,7 @@ struct sdhci_host; struct sdhci_pltfm_data { struct sdhci_ops *ops; unsigned int quirks; - int (*init)(struct sdhci_host *host); + int (*init)(struct sdhci_host *host, struct sdhci_pltfm_data *pdata); void (*exit)(struct sdhci_host *host); };