From 7a870a620fa868ed4ce0cffcbd6b0683a00ae2e5 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@marvell.com>
Date: Mon, 27 Sep 2010 10:30:01 -0400
Subject: [PATCH 1/3] sdhci-pltfm: add call back alloc_host
alloc_host could alloc specific structure of device to meet different requirement
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
---
drivers/mmc/host/sdhci-pltfm.c | 4 ++--
include/linux/sdhci-pltfm.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
@@ -76,8 +76,8 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "Invalid iomem size. You may "
"experience problems.\n");
- if (pdev->dev.parent)
- host = sdhci_alloc_host(pdev->dev.parent, 0);
+ if (pdata && pdata->alloc_host)
+ host = pdata->alloc_host(&pdev->dev);
else
host = sdhci_alloc_host(&pdev->dev, 0);
@@ -30,6 +30,7 @@ struct sdhci_pltfm_data {
unsigned int quirks;
int (*init)(struct sdhci_host *host, struct sdhci_pltfm_data *pdata, void* priv_pdata);
void (*exit)(struct sdhci_host *host);
+ struct sdhci_host *(*alloc_host)(struct device *dev);
};
#endif /* _SDHCI_PLTFM_H */
--
1.7.0.4