Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[safe/jmp/linux-2.6] / drivers / ata / pata_ns87410.c
index 76d2455..2110863 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * pata_ns87410.c      - National Semiconductor 87410 PATA for new ATA layer
  *                       (C) 2006 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -91,9 +90,9 @@ static void ns87410_set_piomode(struct ata_port *ap, struct ata_device *adev)
                return;
        }
 
-       at.active = FIT(at.active, 2, 16) - 2;
-       at.setup = FIT(at.setup, 1, 4) - 1;
-       at.recover = FIT(at.recover, 1, 12) - 1;
+       at.active = clamp_val(at.active, 2, 16) - 2;
+       at.setup = clamp_val(at.setup, 1, 4) - 1;
+       at.recover = clamp_val(at.recover, 1, 12) - 1;
 
        idetcr = (at.setup << 6) | (recoverbits[at.recover] << 3) | activebits[at.active];
 
@@ -145,11 +144,11 @@ static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
        static const struct ata_port_info info = {
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x0F,
+               .pio_mask = ATA_PIO3,
                .port_ops = &ns87410_port_ops
        };
        const struct ata_port_info *ppi[] = { &info, NULL };
-       return ata_pci_sff_init_one(dev, ppi, &ns87410_sht, NULL);
+       return ata_pci_sff_init_one(dev, ppi, &ns87410_sht, NULL, 0);
 }
 
 static const struct pci_device_id ns87410[] = {