Esempio n. 1
0
int
msclose(dev_t dev, int flags, int mode, struct lwp *l)
{
	struct ms_port *ms;

	ms = MS_DEV2MSPORT(dev);

	ms_disable(ms);
	ev_fini(&ms->ms_events);
	ms->ms_events.ev_io = NULL;
	return(0);
}
Esempio n. 2
0
int
kbdclose(dev_t dev, int flags, int mode, struct lwp *l)
{
	struct kbd_softc *k = device_lookup_private(&kbd_cd, minor(dev));

	/* Turn off event mode, dump the queue */
	k->sc_event_mode = 0;
	ev_fini(&k->sc_events);
	k->sc_events.ev_io = NULL;

	return (0);
}
Esempio n. 3
0
/*
 * Close:
 * Turn off event mode, dump the queue, and close the keyboard
 * unless it is supplying console input.
 */
int
kbdclose(dev_t dev, int flags, int mode, struct lwp *l)
{
	struct kbd_softc *k;

	k = device_lookup_private(&kbd_cd, minor(dev));
	k->k_evmode = 0;
	ev_fini(&k->k_events);
	k->k_events.ev_io = NULL;

	if (k->k_ops != NULL && k->k_ops->close != NULL) {
		int error;
		if ((error = (*k->k_ops->close)(k)) != 0)
			return error;
	}
	return 0;
}
Esempio n. 4
0
int
msclose(dev_t dev, int flags, int mode, struct lwp *l)
{
	struct ms_softc *ms;

	ms = device_lookup_private(&ms_cd, minor(dev));
	ms->ms_ready = 0;		/* stop accepting events */
	ev_fini(&ms->ms_events);

	ms->ms_events.ev_io = NULL;
	if (ms->ms_deviclose) {
		int err;
		err = (*ms->ms_deviclose)(ms->ms_dev, flags);
		if (err)
			return err;
	}
	return 0;
}
Esempio n. 5
0
int
msclose(dev_t dev, int flags, int mode, struct lwp *l)
{
	u_char		disable_ms_joy[] = { 0x12, 0x1a };
	int		unit;
	struct ms_softc	*ms;

	unit = minor (dev);
	ms   = &ms_softc[unit];

	/*
	 * Turn off mouse interrogation.
	 */
	kbd_write(disable_ms_joy, sizeof(disable_ms_joy));
	ev_fini(&ms->ms_events);
	ms->ms_events.ev_io = NULL;
	return(0);
}