summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2009-12-10 20:03:10 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-12-17 01:02:50 -0500
commit4716eaf20f37d10fd01b0fcacb3e41c1abd362c3 (patch)
tree1bc17f6737f9715554ca3687ea9945327a823438 /drivers/ata
parent0cdd6eb7e08fc39e9c906cc46b6ee9095c3077a9 (diff)
downloadblackbird-op-linux-4716eaf20f37d10fd01b0fcacb3e41c1abd362c3.tar.gz
blackbird-op-linux-4716eaf20f37d10fd01b0fcacb3e41c1abd362c3.zip
pata_octeon_cf: use resource_size(), to fix resource sizing bug
It appears the size for cs1 is calculated using the wrong resource. Use the function resource_size to get the correct value. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-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 d6f69561dc86..37ef416c1242 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -853,7 +853,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev)
return -EINVAL;
cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
- res_cs0->end - res_cs1->start + 1);
+ resource_size(res_cs1));
if (!cs1)
return -ENOMEM;
OpenPOWER on IntegriCloud