ahci: add "em_buffer" attribute for AHCI hosts
[safe/jmp/linux-2.6] / drivers / ata / pata_rb532_cf.c
index fbfee1b..0ffd631 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include <linux/gfp.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -89,7 +90,7 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
        ap = ah->ports[0];
 
        ap->ops         = &rb532_pata_port_ops;
-       ap->pio_mask    = 0x1f; /* PIO4 */
+       ap->pio_mask    = ATA_PIO4;
        ap->flags       = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
 
        ap->ioaddr.cmd_addr     = info->iobase + RB500_CF_REG_BASE;
@@ -104,7 +105,7 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
 
 static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
 {
-       unsigned int irq;
+       int irq;
        int gpio;
        struct resource *res;
        struct ata_host *ah;
@@ -151,7 +152,7 @@ static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
        info->irq = irq;
 
        info->iobase = devm_ioremap_nocache(&pdev->dev, res->start,
-                               res->end - res->start + 1);
+                               resource_size(res));
        if (!info->iobase)
                return -ENOMEM;