diff options
Diffstat (limited to 'drivers/ata/pata_marvell.c')
-rw-r--r-- | drivers/ata/pata_marvell.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 2745e23cac43..edbfe0dbbf78 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -161,7 +161,7 @@ static const struct ata_port_operations marvell_ops = { | |||
161 | 161 | ||
162 | static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *id) | 162 | static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *id) |
163 | { | 163 | { |
164 | static struct ata_port_info info = { | 164 | static const struct ata_port_info info = { |
165 | .sht = &marvell_sht, | 165 | .sht = &marvell_sht, |
166 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 166 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
167 | 167 | ||
@@ -171,7 +171,7 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i | |||
171 | 171 | ||
172 | .port_ops = &marvell_ops, | 172 | .port_ops = &marvell_ops, |
173 | }; | 173 | }; |
174 | static struct ata_port_info info_sata = { | 174 | static const struct ata_port_info info_sata = { |
175 | .sht = &marvell_sht, | 175 | .sht = &marvell_sht, |
176 | /* Slave possible as its magically mapped not real */ | 176 | /* Slave possible as its magically mapped not real */ |
177 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 177 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
@@ -182,13 +182,12 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i | |||
182 | 182 | ||
183 | .port_ops = &marvell_ops, | 183 | .port_ops = &marvell_ops, |
184 | }; | 184 | }; |
185 | struct ata_port_info *port_info[2] = { &info, &info_sata }; | 185 | const struct ata_port_info *ppi[] = { &info, &info_sata }; |
186 | int n_port = 2; | ||
187 | 186 | ||
188 | if (pdev->device == 0x6101) | 187 | if (pdev->device == 0x6101) |
189 | n_port = 1; | 188 | ppi[1] = &ata_dummy_port_info; |
190 | 189 | ||
191 | return ata_pci_init_one(pdev, port_info, n_port); | 190 | return ata_pci_init_one(pdev, ppi); |
192 | } | 191 | } |
193 | 192 | ||
194 | static const struct pci_device_id marvell_pci_tbl[] = { | 193 | static const struct pci_device_id marvell_pci_tbl[] = { |