diff options
| -rw-r--r-- | drivers/mmc/host/sdhci-pltfm.c | 8 | ||||
| -rw-r--r-- | include/linux/mmc/sdhci-pltfm.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 685202be277..00e8a8ab638 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c | |||
| @@ -52,15 +52,17 @@ static struct sdhci_ops sdhci_pltfm_ops = { | |||
| 52 | 52 | ||
| 53 | static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) | 53 | static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) |
| 54 | { | 54 | { |
| 55 | struct sdhci_pltfm_data *pdata = pdev->dev.platform_data; | ||
| 56 | const struct platform_device_id *platid = platform_get_device_id(pdev); | 55 | const struct platform_device_id *platid = platform_get_device_id(pdev); |
| 56 | struct sdhci_pltfm_data *pdata; | ||
| 57 | struct sdhci_host *host; | 57 | struct sdhci_host *host; |
| 58 | struct sdhci_pltfm_host *pltfm_host; | 58 | struct sdhci_pltfm_host *pltfm_host; |
| 59 | struct resource *iomem; | 59 | struct resource *iomem; |
| 60 | int ret; | 60 | int ret; |
| 61 | 61 | ||
| 62 | if (!pdata && platid && platid->driver_data) | 62 | if (platid && platid->driver_data) |
| 63 | pdata = (void *)platid->driver_data; | 63 | pdata = (void *)platid->driver_data; |
| 64 | else | ||
| 65 | pdata = pdev->dev.platform_data; | ||
| 64 | 66 | ||
| 65 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 67 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 66 | if (!iomem) { | 68 | if (!iomem) { |
| @@ -109,7 +111,7 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) | |||
| 109 | } | 111 | } |
| 110 | 112 | ||
| 111 | if (pdata && pdata->init) { | 113 | if (pdata && pdata->init) { |
| 112 | ret = pdata->init(host); | 114 | ret = pdata->init(host, pdata); |
| 113 | if (ret) | 115 | if (ret) |
| 114 | goto err_plat_init; | 116 | goto err_plat_init; |
| 115 | } | 117 | } |
diff --git a/include/linux/mmc/sdhci-pltfm.h b/include/linux/mmc/sdhci-pltfm.h index 0239bd70241..548d59d404c 100644 --- a/include/linux/mmc/sdhci-pltfm.h +++ b/include/linux/mmc/sdhci-pltfm.h | |||
| @@ -28,7 +28,7 @@ struct sdhci_host; | |||
| 28 | struct sdhci_pltfm_data { | 28 | struct sdhci_pltfm_data { |
| 29 | struct sdhci_ops *ops; | 29 | struct sdhci_ops *ops; |
| 30 | unsigned int quirks; | 30 | unsigned int quirks; |
| 31 | int (*init)(struct sdhci_host *host); | 31 | int (*init)(struct sdhci_host *host, struct sdhci_pltfm_data *pdata); |
| 32 | void (*exit)(struct sdhci_host *host); | 32 | void (*exit)(struct sdhci_host *host); |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
