have pci register itself as a module, and make PCI driver modules depend on it
This commit is contained in:
parent
7aae24bc7d
commit
3076984ffe
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: azalia.c,v 1.76 2011/08/28 15:40:49 jmcneill Exp $ */
|
||||
/* $NetBSD: azalia.c,v 1.77 2011/08/29 14:47:07 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 The NetBSD Foundation, Inc.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.76 2011/08/28 15:40:49 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.77 2011/08/29 14:47:07 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
@ -2406,7 +2406,7 @@ azalia_params2fmt(const audio_params_t *param, uint16_t *fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, azalia, NULL);
|
||||
MODULE(MODULE_CLASS_DRIVER, azalia, "pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: coram.c,v 1.8 2011/08/09 01:42:24 jmcneill Exp $ */
|
||||
/* $NetBSD: coram.c,v 1.9 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.8 2011/08/09 01:42:24 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.9 2011/08/29 14:47:08 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -1100,7 +1100,7 @@ coram_sram_ch_setup(struct coram_softc *sc, struct coram_sram_ch *csc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, coram, "cx24227,mt2131");
|
||||
MODULE(MODULE_CLASS_DRIVER, coram, "cx24227,mt2131,pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cxdtv.c,v 1.7 2011/08/09 01:42:24 jmcneill Exp $ */
|
||||
/* $NetBSD: cxdtv.c,v 1.8 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.7 2011/08/09 01:42:24 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.8 2011/08/29 14:47:08 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -1164,7 +1164,7 @@ cxdtv_card_init_hd5500(struct cxdtv_softc *sc)
|
||||
delay(200000);
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, cxdtv, "tvpll,nxt2k,lg3303");
|
||||
MODULE(MODULE_CLASS_DRIVER, cxdtv, "tvpll,nxt2k,lg3303,pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hdaudio.c,v 1.13 2011/08/13 16:08:23 jakllsch Exp $ */
|
||||
/* $NetBSD: hdaudio.c,v 1.14 2011/08/29 14:47:09 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.13 2011/08/13 16:08:23 jakllsch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.14 2011/08/29 14:47:09 jmcneill Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -1571,7 +1571,7 @@ hdaudioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
|
||||
return err;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, hdaudio, NULL);
|
||||
MODULE(MODULE_CLASS_DRIVER, hdaudio, "pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -2640,7 +2640,7 @@ alc_iff(struct alc_softc *sc)
|
||||
CSR_WRITE_4(sc, ALC_MAC_CFG, rxcfg);
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, if_alc, NULL);
|
||||
MODULE(MODULE_CLASS_DRIVER, if_alc, "pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ath_pci.c,v 1.42 2011/07/26 20:51:23 dyoung Exp $ */
|
||||
/* $NetBSD: if_ath_pci.c,v 1.43 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.42 2011/07/26 20:51:23 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.43 2011/08/29 14:47:08 jmcneill Exp $");
|
||||
|
||||
/*
|
||||
* PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
|
||||
@ -278,7 +278,7 @@ ath_pci_setup(struct ath_pci_softc *sc)
|
||||
return true;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, if_ath_pci, "ath");
|
||||
MODULE(MODULE_CLASS_DRIVER, if_ath_pci, "ath,pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_cas.c,v 1.13 2011/01/07 11:17:22 jmcneill Exp $ */
|
||||
/* $NetBSD: if_cas.c,v 1.14 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
|
||||
|
||||
/*
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.13 2011/01/07 11:17:22 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.14 2011/08/29 14:47:08 jmcneill Exp $");
|
||||
|
||||
#ifndef _MODULE
|
||||
#include "opt_inet.h"
|
||||
@ -2068,7 +2068,7 @@ cas_start(struct ifnet *ifp)
|
||||
sc->sc_tx_prod = bix;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, if_cas, NULL);
|
||||
MODULE(MODULE_CLASS_DRIVER, if_cas, "pci");
|
||||
|
||||
#ifdef _MODULE
|
||||
#include "ioconf.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci.c,v 1.141 2011/08/24 20:27:35 dyoung Exp $ */
|
||||
/* $NetBSD: pci.c,v 1.142 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997, 1998
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.141 2011/08/24 20:27:35 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.142 2011/08/29 14:47:08 jmcneill Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
|
||||
@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.141 2011/08/24 20:27:35 dyoung Exp $");
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/module.h>
|
||||
|
||||
#include <dev/pci/pcireg.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
@ -973,3 +974,13 @@ pci_child_register(device_t child)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
MODULE(MODULE_CLASS_DRIVER, pci, NULL);
|
||||
|
||||
static int
|
||||
pci_modcmd(modcmd_t cmd, void *priv)
|
||||
{
|
||||
if (cmd == MODULE_CMD_INIT || cmd == MODULE_CMD_FINI)
|
||||
return 0;
|
||||
return ENOTTY;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci_verbose.c,v 1.7 2010/07/25 14:14:25 pgoyette Exp $ */
|
||||
/* $NetBSD: pci_verbose.c,v 1.8 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Zubin D. Dittia. All rights reserved.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_verbose.c,v 1.7 2010/07/25 14:14:25 pgoyette Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_verbose.c,v 1.8 2011/08/29 14:47:08 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -69,7 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: pci_verbose.c,v 1.7 2010/07/25 14:14:25 pgoyette Exp
|
||||
#ifdef _KERNEL
|
||||
static int pciverbose_modcmd(modcmd_t, void *);
|
||||
|
||||
MODULE(MODULE_CLASS_MISC, pciverbose, NULL);
|
||||
MODULE(MODULE_CLASS_MISC, pciverbose, "pci");
|
||||
|
||||
static int
|
||||
pciverbose_modcmd(modcmd_t cmd, void *arg)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $$NetBSD: pwdog.c,v 1.4 2011/08/26 13:29:56 mbalmer Exp $ */
|
||||
/* $$NetBSD: pwdog.c,v 1.5 2011/08/29 14:47:08 jmcneill Exp $ */
|
||||
/* $OpenBSD: pwdog.c,v 1.7 2010/04/08 00:23:53 tedu Exp $ */
|
||||
|
||||
/*
|
||||
@ -194,7 +194,7 @@ pwdog_tickle(struct sysmon_wdog *smw)
|
||||
}
|
||||
|
||||
#ifdef _MODULE
|
||||
MODULE(MODULE_CLASS_DRIVER, pwdog, NULL);
|
||||
MODULE(MODULE_CLASS_DRIVER, pwdog, "pci");
|
||||
|
||||
#include "ioconf.c"
|
||||
|
||||
|
2
sys/external/bsd/drm/dist/bsd-core/drm_drv.c
vendored
2
sys/external/bsd/drm/dist/bsd-core/drm_drv.c
vendored
@ -1122,7 +1122,7 @@ drm_linux_ioctl(DRM_STRUCTPROC *p, struct linux_ioctl_args* args)
|
||||
#if defined(__NetBSD__)
|
||||
/* Module support */
|
||||
|
||||
MODULE(MODULE_CLASS_MISC, drm, NULL);
|
||||
MODULE(MODULE_CLASS_MISC, drm, "pci");
|
||||
|
||||
static int
|
||||
drm_modcmd(modcmd_t cmd, void *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user