aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/s3cmci.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8c08cd7efa7f..84e088c44540 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -58,8 +58,6 @@ static const int dbgmap_debug = dbg_err | dbg_debug;
58 dev_dbg(&host->pdev->dev, args); \ 58 dev_dbg(&host->pdev->dev, args); \
59 } while (0) 59 } while (0)
60 60
61#define RESSIZE(ressource) (((ressource)->end - (ressource)->start)+1)
62
63static struct s3c2410_dma_client s3cmci_dma_client = { 61static struct s3c2410_dma_client s3cmci_dma_client = {
64 .name = "s3c-mci", 62 .name = "s3c-mci",
65}; 63};
@@ -1298,7 +1296,7 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440)
1298 } 1296 }
1299 1297
1300 host->mem = request_mem_region(host->mem->start, 1298 host->mem = request_mem_region(host->mem->start,
1301 RESSIZE(host->mem), pdev->name); 1299 resource_size(host->mem), pdev->name);
1302 1300
1303 if (!host->mem) { 1301 if (!host->mem) {
1304 dev_err(&pdev->dev, "failed to request io memory region.\n"); 1302 dev_err(&pdev->dev, "failed to request io memory region.\n");
@@ -1306,7 +1304,7 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440)
1306 goto probe_free_host; 1304 goto probe_free_host;
1307 } 1305 }
1308 1306
1309 host->base = ioremap(host->mem->start, RESSIZE(host->mem)); 1307 host->base = ioremap(host->mem->start, resource_size(host->mem));
1310 if (!host->base) { 1308 if (!host->base) {
1311 dev_err(&pdev->dev, "failed to ioremap() io memory region.\n"); 1309 dev_err(&pdev->dev, "failed to ioremap() io memory region.\n");
1312 ret = -EINVAL; 1310 ret = -EINVAL;
@@ -1433,7 +1431,7 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440)
1433 iounmap(host->base); 1431 iounmap(host->base);
1434 1432
1435 probe_free_mem_region: 1433 probe_free_mem_region:
1436 release_mem_region(host->mem->start, RESSIZE(host->mem)); 1434 release_mem_region(host->mem->start, resource_size(host->mem));
1437 1435
1438 probe_free_host: 1436 probe_free_host:
1439 mmc_free_host(mmc); 1437 mmc_free_host(mmc);
@@ -1469,7 +1467,7 @@ static int __devexit s3cmci_remove(struct platform_device *pdev)
1469 free_irq(host->irq, host); 1467 free_irq(host->irq, host);
1470 1468
1471 iounmap(host->base); 1469 iounmap(host->base);
1472 release_mem_region(host->mem->start, RESSIZE(host->mem)); 1470 release_mem_region(host->mem->start, resource_size(host->mem));
1473 1471
1474 mmc_free_host(mmc); 1472 mmc_free_host(mmc);
1475 return 0; 1473 return 0;