aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2006-06-23 19:11:22 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-26 17:25:18 -0400
commit7ee613970947bdf5f722bb01547c97f4fc80fe9f (patch)
tree5cb0c4b3a7b216a689a81aa8583c2e28e6fef056 /drivers/scsi/qla2xxx
parent7d7abc77cc469ff41dde8eea606e1dab88d4ba86 (diff)
[SCSI] qla2xxx: Convert from pci_module_init() to pci_register_driver().
Also remove qla2xxx_probe_one/qla2xxx_remove_one stubs previously used with external firmware module loaders. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c38
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index a15b60908133..3516e36107b1 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1337,7 +1337,8 @@ qla24xx_disable_intrs(scsi_qla_host_t *ha)
1337/* 1337/*
1338 * PCI driver interface 1338 * PCI driver interface
1339 */ 1339 */
1340static int qla2x00_probe_one(struct pci_dev *pdev) 1340static int __devinit
1341qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1341{ 1342{
1342 int ret = -ENODEV; 1343 int ret = -ENODEV;
1343 device_reg_t __iomem *reg; 1344 device_reg_t __iomem *reg;
@@ -1650,7 +1651,8 @@ probe_out:
1650 return ret; 1651 return ret;
1651} 1652}
1652 1653
1653static void qla2x00_remove_one(struct pci_dev *pdev) 1654static void __devexit
1655qla2x00_remove_one(struct pci_dev *pdev)
1654{ 1656{
1655 scsi_qla_host_t *ha; 1657 scsi_qla_host_t *ha;
1656 1658
@@ -2644,40 +2646,16 @@ static struct pci_device_id qla2xxx_pci_tbl[] = {
2644}; 2646};
2645MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl); 2647MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl);
2646 2648
2647static int __devinit
2648qla2xxx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
2649{
2650 return qla2x00_probe_one(pdev);
2651}
2652
2653static void __devexit
2654qla2xxx_remove_one(struct pci_dev *pdev)
2655{
2656 qla2x00_remove_one(pdev);
2657}
2658
2659static struct pci_driver qla2xxx_pci_driver = { 2649static struct pci_driver qla2xxx_pci_driver = {
2660 .name = QLA2XXX_DRIVER_NAME, 2650 .name = QLA2XXX_DRIVER_NAME,
2661 .driver = { 2651 .driver = {
2662 .owner = THIS_MODULE, 2652 .owner = THIS_MODULE,
2663 }, 2653 },
2664 .id_table = qla2xxx_pci_tbl, 2654 .id_table = qla2xxx_pci_tbl,
2665 .probe = qla2xxx_probe_one, 2655 .probe = qla2x00_probe_one,
2666 .remove = __devexit_p(qla2xxx_remove_one), 2656 .remove = __devexit_p(qla2x00_remove_one),
2667}; 2657};
2668 2658
2669static inline int
2670qla2x00_pci_module_init(void)
2671{
2672 return pci_module_init(&qla2xxx_pci_driver);
2673}
2674
2675static inline void
2676qla2x00_pci_module_exit(void)
2677{
2678 pci_unregister_driver(&qla2xxx_pci_driver);
2679}
2680
2681/** 2659/**
2682 * qla2x00_module_init - Module initialization. 2660 * qla2x00_module_init - Module initialization.
2683 **/ 2661 **/
@@ -2706,7 +2684,7 @@ qla2x00_module_init(void)
2706 return -ENODEV; 2684 return -ENODEV;
2707 2685
2708 printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n"); 2686 printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n");
2709 ret = qla2x00_pci_module_init(); 2687 ret = pci_register_driver(&qla2xxx_pci_driver);
2710 if (ret) { 2688 if (ret) {
2711 kmem_cache_destroy(srb_cachep); 2689 kmem_cache_destroy(srb_cachep);
2712 fc_release_transport(qla2xxx_transport_template); 2690 fc_release_transport(qla2xxx_transport_template);
@@ -2720,7 +2698,7 @@ qla2x00_module_init(void)
2720static void __exit 2698static void __exit
2721qla2x00_module_exit(void) 2699qla2x00_module_exit(void)
2722{ 2700{
2723 qla2x00_pci_module_exit(); 2701 pci_unregister_driver(&qla2xxx_pci_driver);
2724 qla2x00_release_firmware(); 2702 qla2x00_release_firmware();
2725 kmem_cache_destroy(srb_cachep); 2703 kmem_cache_destroy(srb_cachep);
2726 fc_release_transport(qla2xxx_transport_template); 2704 fc_release_transport(qla2xxx_transport_template);