Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298793
b: refs/heads/master
c: 9bda6da
h: refs/heads/master
i:
  298791: 05b7796
v: v3
  • Loading branch information
Julia Lawall authored and Chris Ball committed Apr 6, 2012
1 parent af85bda commit f3ecae1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 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: 1d4dc338bb7cbbadcb5a527b1b0e897b5cde1701
refs/heads/master: 9bda6da7ff7d35ef757e235aae559e679d3a9493
27 changes: 3 additions & 24 deletions trunk/drivers/mmc/host/sdhci-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,6 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
return irq;
}

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "no memory specified\n");
return -ENOENT;
}

host = sdhci_alloc_host(dev, sizeof(struct sdhci_s3c));
if (IS_ERR(host)) {
dev_err(dev, "sdhci_alloc_host() failed\n");
Expand Down Expand Up @@ -513,15 +507,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
goto err_no_busclks;
}

sc->ioarea = request_mem_region(res->start, resource_size(res),
mmc_hostname(host->mmc));
if (!sc->ioarea) {
dev_err(dev, "failed to reserve register area\n");
ret = -ENXIO;
goto err_req_regs;
}

host->ioaddr = ioremap_nocache(res->start, resource_size(res));
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
if (!host->ioaddr) {
dev_err(dev, "failed to map registers\n");
ret = -ENXIO;
Expand Down Expand Up @@ -606,7 +593,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
ret = sdhci_add_host(host);
if (ret) {
dev_err(dev, "sdhci_add_host() failed\n");
goto err_add_host;
goto err_req_regs;
}

/* The following two methods of card detection might call
Expand All @@ -620,10 +607,6 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)

return 0;

err_add_host:
release_resource(sc->ioarea);
kfree(sc->ioarea);

err_req_regs:
for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
if (sc->clk_bus[ptr]) {
Expand Down Expand Up @@ -669,10 +652,6 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
clk_disable(sc->clk_io);
clk_put(sc->clk_io);

iounmap(host->ioaddr);
release_resource(sc->ioarea);
kfree(sc->ioarea);

sdhci_free_host(host);
platform_set_drvdata(pdev, NULL);

Expand Down

0 comments on commit f3ecae1

Please sign in to comment.