Commit 7ee61397 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[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: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 7d7abc77
...@@ -1337,7 +1337,8 @@ qla24xx_disable_intrs(scsi_qla_host_t *ha) ...@@ -1337,7 +1337,8 @@ qla24xx_disable_intrs(scsi_qla_host_t *ha)
/* /*
* PCI driver interface * PCI driver interface
*/ */
static int qla2x00_probe_one(struct pci_dev *pdev) static int __devinit
qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{ {
int ret = -ENODEV; int ret = -ENODEV;
device_reg_t __iomem *reg; device_reg_t __iomem *reg;
...@@ -1650,7 +1651,8 @@ static int qla2x00_probe_one(struct pci_dev *pdev) ...@@ -1650,7 +1651,8 @@ static int qla2x00_probe_one(struct pci_dev *pdev)
return ret; return ret;
} }
static void qla2x00_remove_one(struct pci_dev *pdev) static void __devexit
qla2x00_remove_one(struct pci_dev *pdev)
{ {
scsi_qla_host_t *ha; scsi_qla_host_t *ha;
...@@ -2644,40 +2646,16 @@ static struct pci_device_id qla2xxx_pci_tbl[] = { ...@@ -2644,40 +2646,16 @@ static struct pci_device_id qla2xxx_pci_tbl[] = {
}; };
MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl); MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl);
static int __devinit
qla2xxx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
return qla2x00_probe_one(pdev);
}
static void __devexit
qla2xxx_remove_one(struct pci_dev *pdev)
{
qla2x00_remove_one(pdev);
}
static struct pci_driver qla2xxx_pci_driver = { static struct pci_driver qla2xxx_pci_driver = {
.name = QLA2XXX_DRIVER_NAME, .name = QLA2XXX_DRIVER_NAME,
.driver = { .driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.id_table = qla2xxx_pci_tbl, .id_table = qla2xxx_pci_tbl,
.probe = qla2xxx_probe_one, .probe = qla2x00_probe_one,
.remove = __devexit_p(qla2xxx_remove_one), .remove = __devexit_p(qla2x00_remove_one),
}; };
static inline int
qla2x00_pci_module_init(void)
{
return pci_module_init(&qla2xxx_pci_driver);
}
static inline void
qla2x00_pci_module_exit(void)
{
pci_unregister_driver(&qla2xxx_pci_driver);
}
/** /**
* qla2x00_module_init - Module initialization. * qla2x00_module_init - Module initialization.
**/ **/
...@@ -2706,7 +2684,7 @@ qla2x00_module_init(void) ...@@ -2706,7 +2684,7 @@ qla2x00_module_init(void)
return -ENODEV; return -ENODEV;
printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n"); printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n");
ret = qla2x00_pci_module_init(); ret = pci_register_driver(&qla2xxx_pci_driver);
if (ret) { if (ret) {
kmem_cache_destroy(srb_cachep); kmem_cache_destroy(srb_cachep);
fc_release_transport(qla2xxx_transport_template); fc_release_transport(qla2xxx_transport_template);
...@@ -2720,7 +2698,7 @@ qla2x00_module_init(void) ...@@ -2720,7 +2698,7 @@ qla2x00_module_init(void)
static void __exit static void __exit
qla2x00_module_exit(void) qla2x00_module_exit(void)
{ {
qla2x00_pci_module_exit(); pci_unregister_driver(&qla2xxx_pci_driver);
qla2x00_release_firmware(); qla2x00_release_firmware();
kmem_cache_destroy(srb_cachep); kmem_cache_destroy(srb_cachep);
fc_release_transport(qla2xxx_transport_template); fc_release_transport(qla2xxx_transport_template);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment