sata_mv: Clean up hard coded array size calculation.
[safe/jmp/linux-2.6] / drivers / ata / pata_cs5535.c
index f1b6556..403f561 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * pata-cs5535.c       - CS5535 PATA for new ATA layer
  *                       (C) 2005-2006 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
+ *                       Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * based upon cs5535.c from AMD <Jens.Altmann@amd.com> as cleaned up and
  * made readable and Linux style by Wolfgang Zuleger <wolfgang.zuleger@gmx.de
@@ -72,7 +72,6 @@
 /**
  *     cs5535_cable_detect     -       detect cable type
  *     @ap: Port to detect on
- *     @deadline: deadline jiffies for the operation
  *
  *     Perform cable detection for ATA66 capable cable. Return a libata
  *     cable type.
@@ -182,8 +181,8 @@ static int cs5535_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 = 0x1f,
-               .mwdma_mask = 0x07,
+               .pio_mask = ATA_PIO4,
+               .mwdma_mask = ATA_MWDMA2,
                .udma_mask = ATA_UDMA4,
                .port_ops = &cs5535_port_ops
        };
@@ -203,7 +202,8 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 }
 
 static const struct pci_device_id cs5535[] = {
-       { PCI_VDEVICE(NS, 0x002D), },
+       { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_CS5535_IDE), },
+       { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5535_IDE), },
 
        { },
 };