1*2fd415f4SDavid Hollister /* 2*2fd415f4SDavid Hollister * CDDL HEADER START 3*2fd415f4SDavid Hollister * 4*2fd415f4SDavid Hollister * The contents of this file are subject to the terms of the 5*2fd415f4SDavid Hollister * Common Development and Distribution License (the "License"). 6*2fd415f4SDavid Hollister * You may not use this file except in compliance with the License. 7*2fd415f4SDavid Hollister * 8*2fd415f4SDavid Hollister * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*2fd415f4SDavid Hollister * or http://www.opensolaris.org/os/licensing. 10*2fd415f4SDavid Hollister * See the License for the specific language governing permissions 11*2fd415f4SDavid Hollister * and limitations under the License. 12*2fd415f4SDavid Hollister * 13*2fd415f4SDavid Hollister * When distributing Covered Code, include this CDDL HEADER in each 14*2fd415f4SDavid Hollister * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*2fd415f4SDavid Hollister * If applicable, add the following below this CDDL HEADER, with the 16*2fd415f4SDavid Hollister * fields enclosed by brackets "[]" replaced with your own identifying 17*2fd415f4SDavid Hollister * information: Portions Copyright [yyyy] [name of copyright owner] 18*2fd415f4SDavid Hollister * 19*2fd415f4SDavid Hollister * CDDL HEADER END 20*2fd415f4SDavid Hollister * 21*2fd415f4SDavid Hollister * 22*2fd415f4SDavid Hollister * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23*2fd415f4SDavid Hollister * Use is subject to license terms. 24*2fd415f4SDavid Hollister */ 25*2fd415f4SDavid Hollister /* 26*2fd415f4SDavid Hollister * Solaris kernel module linkage code to make a minimal module. 27*2fd415f4SDavid Hollister */ 28*2fd415f4SDavid Hollister #include <sys/modctl.h> 29*2fd415f4SDavid Hollister int pmcs8001_fwversion = PMCS_FIRMWARE_VERSION; 30*2fd415f4SDavid Hollister 31*2fd415f4SDavid Hollister static struct modlmisc modlmisc = { 32*2fd415f4SDavid Hollister &mod_miscops, "PMC-Sierra Firmware " PMCS_FIRMWARE_VERSION_STRING 33*2fd415f4SDavid Hollister }; 34*2fd415f4SDavid Hollister 35*2fd415f4SDavid Hollister static struct modlinkage modlinkage = { 36*2fd415f4SDavid Hollister MODREV_1, 37*2fd415f4SDavid Hollister (void *)&modlmisc 38*2fd415f4SDavid Hollister }; 39*2fd415f4SDavid Hollister 40*2fd415f4SDavid Hollister int _init()41*2fd415f4SDavid Hollister_init() 42*2fd415f4SDavid Hollister { 43*2fd415f4SDavid Hollister return (mod_install(&modlinkage)); 44*2fd415f4SDavid Hollister } 45*2fd415f4SDavid Hollister 46*2fd415f4SDavid Hollister int _fini()47*2fd415f4SDavid Hollister_fini() 48*2fd415f4SDavid Hollister { 49*2fd415f4SDavid Hollister return (mod_remove(&modlinkage)); 50*2fd415f4SDavid Hollister } 51*2fd415f4SDavid Hollister 52*2fd415f4SDavid Hollister int _info(struct modinfo * mip)53*2fd415f4SDavid Hollister_info(struct modinfo *mip) 54*2fd415f4SDavid Hollister { 55*2fd415f4SDavid Hollister return (mod_info(&modlinkage, mip)); 56*2fd415f4SDavid Hollister } 57