]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_optidma.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_optidma.c
index b70e04c144dfa591ec6afe925b9b9acaa756b118..f89bdfde16d067469528557f0036dbaf5304a65e 100644 (file)
@@ -48,11 +48,12 @@ static int pci_clock;       /* 0 = 33 1 = 25 */
 /**
  *     optidma_pre_reset               -       probe begin
  *     @ap: ATA port
+ *     @deadline: deadline jiffies for the operation
  *
  *     Set up cable type and use generic probe init
  */
 
-static int optidma_pre_reset(struct ata_port *ap)
+static int optidma_pre_reset(struct ata_port *ap, unsigned long deadline)
 {
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
        static const struct pci_bits optidma_enable_bits = {
@@ -62,7 +63,7 @@ static int optidma_pre_reset(struct ata_port *ap)
        if (ap->port_no && !pci_test_config_bits(pdev, &optidma_enable_bits))
                return -ENOENT;
 
-       return ata_std_prereset(ap);
+       return ata_std_prereset(ap, deadline);
 }
 
 /**
@@ -362,10 +363,6 @@ static struct scsi_host_template optidma_sht = {
        .slave_configure        = ata_scsi_slave_config,
        .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
-#ifdef CONFIG_PM
-       .resume                 = ata_scsi_device_resume,
-       .suspend                = ata_scsi_device_suspend,
-#endif
 };
 
 static struct ata_port_operations optidma_port_ops = {
@@ -485,23 +482,22 @@ done_nomsg:               /* Wrong chip revision */
 
 static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       static struct ata_port_info info_82c700 = {
+       static const struct ata_port_info info_82c700 = {
                .sht = &optidma_sht,
-               .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags = ATA_FLAG_SLAVE_POSS,
                .pio_mask = 0x1f,
                .mwdma_mask = 0x07,
                .port_ops = &optidma_port_ops
        };
-       static struct ata_port_info info_82c700_udma = {
+       static const struct ata_port_info info_82c700_udma = {
                .sht = &optidma_sht,
-               .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags = ATA_FLAG_SLAVE_POSS,
                .pio_mask = 0x1f,
                .mwdma_mask = 0x07,
                .udma_mask = 0x07,
                .port_ops = &optiplus_port_ops
        };
-       static struct ata_port_info *port_info[2];
-       struct ata_port_info *info = &info_82c700;
+       const struct ata_port_info *ppi[] = { &info_82c700, NULL };
        static int printed_version;
 
        if (!printed_version++)
@@ -513,10 +509,9 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        pci_clock = inb(0x1F5) & 1;             /* 0 = 33Mhz, 1 = 25Mhz */
 
        if (optiplus_with_udma(dev))
-               info = &info_82c700_udma;
+               ppi[0] = &info_82c700_udma;
 
-       port_info[0] = port_info[1] = info;
-       return ata_pci_init_one(dev, port_info, 2);
+       return ata_pci_init_one(dev, ppi);
 }
 
 static const struct pci_device_id optidma[] = {