* [PATCH] pata_octeon_cf.c: use resource_size()
@ 2009-12-11 1:03 H Hartley Sweeten
2009-12-17 6:03 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-11 1:03 UTC (permalink / raw)
To: linux-ide
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>
---
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index d6f6956..37ef416 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-17 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 1:03 [PATCH] pata_octeon_cf.c: use resource_size() H Hartley Sweeten
2009-12-17 6:03 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).