Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195694
b: refs/heads/master
c: 6a03b4c
h: refs/heads/master
v: v3
  • Loading branch information
Harish Zunjarrao authored and James Bottomley committed May 16, 2010
1 parent f7cf772 commit 7e83121
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e46f031322bdd8d1f11e17fb7cf00c38b08dd55
refs/heads/master: 6a03b4cd78f3f2695a2d0e6343d555b3de0e67c1
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@

#include "qla_bsg.h"
#include "qla_nx.h"
#define QLA2XXX_DRIVER_NAME "qla2xxx"
#define QLA2XXX_DRIVER_NAME "qla2xxx"
#define QLA2XXX_APIDEV "ql2xapidev"

/*
* We have MAILBOX_REGISTER_COUNT sized arrays in a few places,
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*/
char qla2x00_version_str[40];

static int apidev_major;

/*
* SRB allocation cache
*/
Expand Down Expand Up @@ -3763,6 +3765,10 @@ static struct pci_driver qla2xxx_pci_driver = {
.err_handler = &qla2xxx_err_handler,
};

static struct file_operations apidev_fops = {
.owner = THIS_MODULE,
};

/**
* qla2x00_module_init - Module initialization.
**/
Expand Down Expand Up @@ -3791,6 +3797,13 @@ qla2x00_module_init(void)
kmem_cache_destroy(srb_cachep);
return -ENODEV;
}

apidev_major = register_chrdev(0, QLA2XXX_APIDEV, &apidev_fops);
if (apidev_major < 0) {
printk(KERN_WARNING "qla2xxx: Unable to register char device "
"%s\n", QLA2XXX_APIDEV);
}

qla2xxx_transport_vport_template =
fc_attach_transport(&qla2xxx_transport_vport_functions);
if (!qla2xxx_transport_vport_template) {
Expand All @@ -3816,6 +3829,7 @@ qla2x00_module_init(void)
static void __exit
qla2x00_module_exit(void)
{
unregister_chrdev(apidev_major, QLA2XXX_APIDEV);
pci_unregister_driver(&qla2xxx_pci_driver);
qla2x00_release_firmware();
kmem_cache_destroy(srb_cachep);
Expand Down

0 comments on commit 7e83121

Please sign in to comment.