hardware/mISDN/mISDNinfineon.c: bail out of loop on error
[safe/jmp/linux-2.6] / drivers / ide / ide_platform.c
index 47413c2..42965b3 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
-static void __devinit plat_ide_setup_ports(hw_regs_t *hw,
+static void __devinit plat_ide_setup_ports(struct ide_hw *hw,
                                           void __iomem *base,
                                           void __iomem *ctrl,
                                           struct pata_platform_info *pdata,
@@ -54,7 +54,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
        struct pata_platform_info *pdata;
        struct ide_host *host;
        int ret = 0, mmio = 0;
-       hw_regs_t hw, *hws[] = { &hw };
+       struct ide_hw hw, *hws[] = { &hw };
        struct ide_port_info d = platform_ide_port_info;
 
        pdata = pdev->dev.platform_data;
@@ -81,14 +81,14 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
 
        if (mmio) {
                base = devm_ioremap(&pdev->dev,
-                       res_base->start, res_base->end - res_base->start + 1);
+                       res_base->start, resource_size(res_base));
                alt_base = devm_ioremap(&pdev->dev,
-                       res_alt->start, res_alt->end - res_alt->start + 1);
+                       res_alt->start, resource_size(res_alt));
        } else {
                base = devm_ioport_map(&pdev->dev,
-                       res_base->start, res_base->end - res_base->start + 1);
+                       res_base->start, resource_size(res_base));
                alt_base = devm_ioport_map(&pdev->dev,
-                       res_alt->start, res_alt->end - res_alt->start + 1);
+                       res_alt->start, resource_size(res_alt));
        }
 
        memset(&hw, 0, sizeof(hw));
@@ -112,7 +112,7 @@ out:
 
 static int __devexit plat_ide_remove(struct platform_device *pdev)
 {
-       struct ide_host *host = pdev->dev.driver_data;
+       struct ide_host *host = dev_get_drvdata(&pdev->dev);
 
        ide_host_remove(host);