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) | |||
54 | 54 | ||
55 | for (i = 0; i < ATA_MAX_DEVICES; i++) { | 55 | for (i = 0; i < ATA_MAX_DEVICES; i++) { |
56 | struct ata_device *dev = &ap->device[i]; | 56 | struct ata_device *dev = &ap->device[i]; |
57 | if (ata_dev_ready(dev)) { | 57 | if (ata_dev_enabled(dev)) { |
58 | /* We don't really care */ | 58 | /* We don't really care */ |
59 | dev->pio_mode = XFER_PIO_0; | 59 | dev->pio_mode = XFER_PIO_0; |
60 | dev->dma_mode = XFER_MW_DMA_0; | 60 | dev->dma_mode = XFER_MW_DMA_0; |
@@ -90,10 +90,6 @@ static struct scsi_host_template generic_sht = { | |||
90 | .slave_configure = ata_scsi_slave_config, | 90 | .slave_configure = ata_scsi_slave_config, |
91 | .slave_destroy = ata_scsi_slave_destroy, | 91 | .slave_destroy = ata_scsi_slave_destroy, |
92 | .bios_param = ata_std_bios_param, | 92 | .bios_param = ata_std_bios_param, |
93 | #ifdef CONFIG_PM | ||
94 | .resume = ata_scsi_device_resume, | ||
95 | .suspend = ata_scsi_device_suspend, | ||
96 | #endif | ||
97 | }; | 93 | }; |
98 | 94 | ||
99 | static struct ata_port_operations generic_port_ops = { | 95 | static struct ata_port_operations generic_port_ops = { |
@@ -145,7 +141,7 @@ static int all_generic_ide; /* Set to claim all devices */ | |||
145 | static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 141 | static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
146 | { | 142 | { |
147 | u16 command; | 143 | u16 command; |
148 | static struct ata_port_info info = { | 144 | static const struct ata_port_info info = { |
149 | .sht = &generic_sht, | 145 | .sht = &generic_sht, |
150 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 146 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
151 | .pio_mask = 0x1f, | 147 | .pio_mask = 0x1f, |
@@ -153,7 +149,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id | |||
153 | .udma_mask = 0x3f, | 149 | .udma_mask = 0x3f, |
154 | .port_ops = &generic_port_ops | 150 | .port_ops = &generic_port_ops |
155 | }; | 151 | }; |
156 | static struct ata_port_info *port_info[2] = { &info, &info }; | 152 | const struct ata_port_info *ppi[] = { &info, NULL }; |
157 | 153 | ||
158 | /* Don't use the generic entry unless instructed to do so */ | 154 | /* Don't use the generic entry unless instructed to do so */ |
159 | if (id->driver_data == 1 && all_generic_ide == 0) | 155 | 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 | |||
179 | if (dev->vendor == PCI_VENDOR_ID_AL) | 175 | if (dev->vendor == PCI_VENDOR_ID_AL) |
180 | ata_pci_clear_simplex(dev); | 176 | ata_pci_clear_simplex(dev); |
181 | 177 | ||
182 | return ata_pci_init_one(dev, port_info, 2); | 178 | return ata_pci_init_one(dev, ppi); |
183 | } | 179 | } |
184 | 180 | ||
185 | static struct pci_device_id ata_generic[] = { | 181 | static struct pci_device_id ata_generic[] = { |