]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
pata_octeon_cf: use resource_size(), to fix resource sizing bug
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 11 Dec 2009 01:03:10 +0000 (20:03 -0500)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 17 Dec 2009 06:02:50 +0000 (01:02 -0500)
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>
drivers/ata/pata_octeon_cf.c

index d6f69561dc86f78bea2d3d6fc017c95a74281805..37ef416c12428e811c777b14a38248de7ab6a429 100644 (file)
@@ -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;