diff options
Diffstat (limited to 'drivers/ata/ata_generic.c')
-rw-r--r-- | drivers/ata/ata_generic.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index 92a491ddd030..c3d753296bc6 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c @@ -54,7 +54,7 @@ static int generic_set_mode(struct ata_port *ap, struct ata_device **unused) for (i = 0; i < ATA_MAX_DEVICES; i++) { struct ata_device *dev = &ap->device[i]; - if (ata_dev_ready(dev)) { + if (ata_dev_enabled(dev)) { /* We don't really care */ dev->pio_mode = XFER_PIO_0; dev->dma_mode = XFER_MW_DMA_0; @@ -90,10 +90,6 @@ static struct scsi_host_template generic_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 generic_port_ops = { @@ -145,7 +141,7 @@ static int all_generic_ide; /* Set to claim all devices */ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) { u16 command; - static struct ata_port_info info = { + static const struct ata_port_info info = { .sht = &generic_sht, .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, .pio_mask = 0x1f, @@ -153,7 +149,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id .udma_mask = 0x3f, .port_ops = &generic_port_ops }; - static struct ata_port_info *port_info[2] = { &info, &info }; + const struct ata_port_info *ppi[] = { &info, NULL }; /* Don't use the generic entry unless instructed to do so */ if (id->driver_data == 1 && all_generic_ide == 0) @@ -179,7 +175,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id if (dev->vendor == PCI_VENDOR_ID_AL) ata_pci_clear_simplex(dev); - return ata_pci_init_one(dev, port_info, 2); + return ata_pci_init_one(dev, ppi); } static struct pci_device_id ata_generic[] = { |