Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298792
b: refs/heads/master
c: 1d4dc33
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Abraham authored and Chris Ball committed Apr 5, 2012
1 parent 05b7796 commit af85bda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d22c77089c86416324d0d87e7ef8cfa931e53cd
refs/heads/master: 1d4dc338bb7cbbadcb5a527b1b0e897b5cde1701
11 changes: 9 additions & 2 deletions trunk/drivers/mmc/host/sdhci-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,15 +424,15 @@ static inline struct sdhci_s3c_drv_data *sdhci_s3c_get_driver_data(

static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
{
struct s3c_sdhci_platdata *pdata = pdev->dev.platform_data;
struct s3c_sdhci_platdata *pdata;
struct sdhci_s3c_drv_data *drv_data;
struct device *dev = &pdev->dev;
struct sdhci_host *host;
struct sdhci_s3c *sc;
struct resource *res;
int ret, irq, ptr, clks;

if (!pdata) {
if (!pdev->dev.platform_data) {
dev_err(dev, "no device data specified\n");
return -ENOENT;
}
Expand All @@ -455,6 +455,13 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
return PTR_ERR(host);
}

pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
ret = -ENOMEM;
goto err_io_clk;
}
memcpy(pdata, pdev->dev.platform_data, sizeof(*pdata));

drv_data = sdhci_s3c_get_driver_data(pdev);
sc = sdhci_priv(host);

Expand Down

0 comments on commit af85bda

Please sign in to comment.