aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-tegra.c')
-rw-r--r--drivers/spi/spi-tegra.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c
index 6c3aa6ecaade..8e30727b5221 100644
--- a/drivers/spi/spi-tegra.c
+++ b/drivers/spi/spi-tegra.c
@@ -498,14 +498,14 @@ static int __init spi_tegra_probe(struct platform_device *pdev)
498 goto err0; 498 goto err0;
499 } 499 }
500 500
501 if (!request_mem_region(r->start, (r->end - r->start) + 1, 501 if (!request_mem_region(r->start, resource_size(r),
502 dev_name(&pdev->dev))) { 502 dev_name(&pdev->dev))) {
503 ret = -EBUSY; 503 ret = -EBUSY;
504 goto err0; 504 goto err0;
505 } 505 }
506 506
507 tspi->phys = r->start; 507 tspi->phys = r->start;
508 tspi->base = ioremap(r->start, r->end - r->start + 1); 508 tspi->base = ioremap(r->start, resource_size(r));
509 if (!tspi->base) { 509 if (!tspi->base) {
510 dev_err(&pdev->dev, "can't ioremap iomem\n"); 510 dev_err(&pdev->dev, "can't ioremap iomem\n");
511 ret = -ENOMEM; 511 ret = -ENOMEM;
@@ -563,7 +563,7 @@ err3:
563err2: 563err2:
564 iounmap(tspi->base); 564 iounmap(tspi->base);
565err1: 565err1:
566 release_mem_region(r->start, (r->end - r->start) + 1); 566 release_mem_region(r->start, resource_size(r));
567err0: 567err0:
568 spi_master_put(master); 568 spi_master_put(master);
569 return ret; 569 return ret;
@@ -588,7 +588,7 @@ static int __devexit spi_tegra_remove(struct platform_device *pdev)
588 iounmap(tspi->base); 588 iounmap(tspi->base);
589 589
590 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 590 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
591 release_mem_region(r->start, (r->end - r->start) + 1); 591 release_mem_region(r->start, resource_size(r));
592 592
593 return 0; 593 return 0;
594} 594}