예제 #1
0
void
pcppi_attach(struct pcppi_softc *sc)
{
        struct pcppi_attach_args pa;
	device_t self = sc->sc_dv;

	callout_init(&sc->sc_bell_ch, CALLOUT_MPSAFE);
	callout_setfunc(&sc->sc_bell_ch, pcppi_bell_callout, sc);
	cv_init(&sc->sc_slp, "bell");

        sc->sc_bellactive = sc->sc_bellpitch = 0;

#if NPCKBD > 0
	/* Provide a beeper for the PC Keyboard, if there isn't one already. */
	pckbd_hookup_bell(pcppi_pckbd_bell, sc);
#endif
#if NATTIMER > 0
	config_defer(sc->sc_dv, pcppi_attach_speaker);
#endif
	if (!pmf_device_register(self, NULL, NULL))
		aprint_error_dev(self, "couldn't establish power handler\n");

	pa.pa_cookie = sc;
	config_search_loc(pcppisearch, sc->sc_dv, "pcppi", NULL, &pa);
}
예제 #2
0
static void
amdpcib_attach(device_t parent, device_t self, void *aux)
{
	struct pci_attach_args *pa = aux;

	pcibattach(parent, self, aux);
	config_search_loc(amdpcib_search, self, "amdpcib", NULL, pa);
}
예제 #3
0
파일: wbsio.c 프로젝트: ryo/netbsd-src
int
wbsio_rescan(device_t self, const char *ifattr, const int *locators)
{

	config_search_loc(wbsio_search, self, ifattr, locators, NULL);

	return 0;
}