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