diff options
Diffstat (limited to 'drivers/ata/pata_artop.c')
-rw-r--r-- | drivers/ata/pata_artop.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index c4ccb75a4f1d..690828eb5226 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
@@ -426,7 +426,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) | |||
426 | .port_ops = &artop6260_ops, | 426 | .port_ops = &artop6260_ops, |
427 | }; | 427 | }; |
428 | struct ata_port_info *port_info[2]; | 428 | struct ata_port_info *port_info[2]; |
429 | struct ata_port_info *info; | 429 | struct ata_port_info *info = NULL; |
430 | int ports = 2; | 430 | int ports = 2; |
431 | 431 | ||
432 | if (!printed_version++) | 432 | if (!printed_version++) |
@@ -470,16 +470,20 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) | |||
470 | pci_write_config_byte(pdev, 0x4a, (reg & ~0x01) | 0x80); | 470 | pci_write_config_byte(pdev, 0x4a, (reg & ~0x01) | 0x80); |
471 | 471 | ||
472 | } | 472 | } |
473 | |||
474 | BUG_ON(info == NULL); | ||
475 | |||
473 | port_info[0] = port_info[1] = info; | 476 | port_info[0] = port_info[1] = info; |
474 | return ata_pci_init_one(pdev, port_info, ports); | 477 | return ata_pci_init_one(pdev, port_info, ports); |
475 | } | 478 | } |
476 | 479 | ||
477 | static const struct pci_device_id artop_pci_tbl[] = { | 480 | static const struct pci_device_id artop_pci_tbl[] = { |
478 | { 0x1191, 0x0005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 481 | { PCI_VDEVICE(ARTOP, 0x0005), 0 }, |
479 | { 0x1191, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 482 | { PCI_VDEVICE(ARTOP, 0x0006), 1 }, |
480 | { 0x1191, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 483 | { PCI_VDEVICE(ARTOP, 0x0007), 1 }, |
481 | { 0x1191, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, | 484 | { PCI_VDEVICE(ARTOP, 0x0008), 2 }, |
482 | { 0x1191, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, | 485 | { PCI_VDEVICE(ARTOP, 0x0009), 2 }, |
486 | |||
483 | { } /* terminate list */ | 487 | { } /* terminate list */ |
484 | }; | 488 | }; |
485 | 489 | ||
@@ -500,7 +504,6 @@ static void __exit artop_exit(void) | |||
500 | pci_unregister_driver(&artop_pci_driver); | 504 | pci_unregister_driver(&artop_pci_driver); |
501 | } | 505 | } |
502 | 506 | ||
503 | |||
504 | module_init(artop_init); | 507 | module_init(artop_init); |
505 | module_exit(artop_exit); | 508 | module_exit(artop_exit); |
506 | 509 | ||