summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_octeon_cf.c
diff options
context:
space:
mode:
authorAlexandru Gheorghiu <gheorghiuandru@gmail.com>2013-03-16 15:32:11 +0100
committerJeff Garzik <jgarzik@redhat.com>2013-04-04 01:53:30 +0200
commitb1cbe7d6214042a6f08da7295757023938bcfdac (patch)
treeea4c3460185cfa4fcf120088bb6168f0b16696c5 /drivers/ata/pata_octeon_cf.c
parentpata_legacy: bogus clock in opti82c46x_set_piomode() (diff)
downloadlinux-b1cbe7d6214042a6f08da7295757023938bcfdac.tar.xz
linux-b1cbe7d6214042a6f08da7295757023938bcfdac.zip
pata_octeon_cf: Use resource_size function
Use resource_size function instead of explicit computation. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_octeon_cf.c')
-rw-r--r--drivers/ata/pata_octeon_cf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index ff2e57f3b597..e73bef3093d2 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -926,7 +926,7 @@ static int octeon_cf_probe(struct platform_device *pdev)
goto free_cf_port;
}
cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
- res_cs1->end - res_cs1->start + 1);
+ resource_size(res_cs1));
if (!cs1)
goto free_cf_port;