[PATCH] pcmcia: cleanups
[linux-2.6] / drivers / scsi / qla2xxx / ql2100.c
1 /*
2  * QLogic ISP2100 device driver for Linux 2.6.x
3  * Copyright (C) 2003 Christoph Hellwig.
4  * Copyright (C) 2003-2004 QLogic Corporation (www.qlogic.com)
5  *
6  * Released under GPL v2.
7  */
8
9 #include <linux/init.h>
10 #include <linux/module.h>
11 #include <linux/pci.h>
12
13 #include "qla_def.h"
14
15 static char qla_driver_name[] = "qla2100";
16
17 extern unsigned char  fw2100tp_version[];
18 extern unsigned char  fw2100tp_version_str[];
19 extern unsigned short fw2100tp_addr01;
20 extern unsigned short fw2100tp_code01[];
21 extern unsigned short fw2100tp_length01;
22
23 static struct qla_fw_info qla_fw_tbl[] = {
24         {
25                 .addressing     = FW_INFO_ADDR_NORMAL,
26                 .fwcode         = &fw2100tp_code01[0],
27                 .fwlen          = &fw2100tp_length01,
28                 .fwstart        = &fw2100tp_addr01,
29         },
30
31         { FW_INFO_ADDR_NOMORE, },
32 };
33
34 static struct qla_board_info qla_board_tbl = {
35         .drv_name       = qla_driver_name,
36
37         .isp_name       = "ISP2100",
38         .fw_info        = qla_fw_tbl,
39 };
40
41 static struct pci_device_id qla2100_pci_tbl[] = {
42         {
43                 .vendor         = PCI_VENDOR_ID_QLOGIC,
44                 .device         = PCI_DEVICE_ID_QLOGIC_ISP2100,
45                 .subvendor      = PCI_ANY_ID,
46                 .subdevice      = PCI_ANY_ID,
47                 .driver_data    = (unsigned long)&qla_board_tbl,
48         },
49
50         {0, 0},
51 };
52 MODULE_DEVICE_TABLE(pci, qla2100_pci_tbl);
53
54 static int __devinit
55 qla2100_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
56 {
57         return qla2x00_probe_one(pdev,
58             (struct qla_board_info *)id->driver_data);
59 }
60
61 static void __devexit
62 qla2100_remove_one(struct pci_dev *pdev)
63 {
64         qla2x00_remove_one(pdev);
65 }
66
67 static struct pci_driver qla2100_pci_driver = {
68         .name           = "qla2100",
69         .id_table       = qla2100_pci_tbl,
70         .probe          = qla2100_probe_one,
71         .remove         = __devexit_p(qla2100_remove_one),
72 };
73
74 static int __init
75 qla2100_init(void)
76 {
77         return pci_module_init(&qla2100_pci_driver);
78 }
79
80 static void __exit
81 qla2100_exit(void)
82 {
83         pci_unregister_driver(&qla2100_pci_driver);
84 }
85
86 module_init(qla2100_init);
87 module_exit(qla2100_exit);
88
89 MODULE_AUTHOR("QLogic Corporation");
90 MODULE_DESCRIPTION("QLogic ISP21xx FC-SCSI Host Bus Adapter driver");
91 MODULE_LICENSE("GPL");
92 MODULE_VERSION(QLA2XXX_VERSION);