1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27
28 #include <sys/types.h>
29 #include <sys/modctl.h>
30 #include <sys/ddi.h>
31 #include <sys/sunddi.h>
32
33 #include <sys/usb/clients/usbser/usbser_keyspan/keyspan_var.h>
34
35 #include <sys/usb/clients/usbser/usbser_keyspan/keyspan_49fw.h>
36
37 /* Get the address of firmware structure */
38 const usbser_keyspan_fw_record_t *
39 keyspan_usa49wlc_fw(void)
40 {
41 #ifdef KEYSPAN_NO_FIRMWARE_SOURCE
42
43 return (NULL);
44 #else
45
46 return (keyspan_usa49wlc_firmware);
47 #endif
48 }
49
50 extern struct mod_ops mod_miscops;
51
52 static struct modlmisc modlmisc = {
53 #ifdef KEYSPAN_NO_FIRMWARE_SOURCE
54 &mod_miscops, "Placeholder module for the firmware of Keyspan"
55 " usb2serial adapter (usa49wlc)"
56 #else
57 &mod_miscops, "Firmware for Keyspan usb2serial adapter (usa49wlc)"
58 #endif
59 };
60
61 static struct modlinkage modlinkage = {
62 MODREV_1, (void *)&modlmisc, NULL
63 };
64
65 int
66 _init(void)
67 {
68 return (mod_install(&modlinkage));
69 }
70
71
72 int
73 _fini(void)
74 {
75 return (mod_remove(&modlinkage));
76 }
77
78
79 int
80 _info(struct modinfo *modinfop)
81 {
82 return (mod_info(&modlinkage, modinfop));
83 }