o Add module event handler.
Now ucom kernel module can unload properly. o Update copyright year. PR: usb/88966 MFC after: 1 week
This commit is contained in:
parent
166cb6ef20
commit
3d3662f90b
@ -1,7 +1,8 @@
|
||||
/* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
|
||||
* Copyright (c) 2001-2003, 2005, 2008
|
||||
* Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -113,6 +114,7 @@ SYSCTL_INT(_hw_usb_ucom, OID_AUTO, debug, CTLFLAG_RW,
|
||||
#define DPRINTFN(n, x)
|
||||
#endif
|
||||
|
||||
static int ucom_modevent(module_t, int, void *);
|
||||
static void ucom_cleanup(struct ucom_softc *);
|
||||
static int ucomparam(struct tty *, struct termios *);
|
||||
static void ucomstart(struct tty *);
|
||||
@ -135,7 +137,7 @@ devclass_t ucom_devclass;
|
||||
|
||||
static moduledata_t ucom_mod = {
|
||||
"ucom",
|
||||
NULL,
|
||||
ucom_modevent,
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -143,6 +145,21 @@ DECLARE_MODULE(ucom, ucom_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);
|
||||
MODULE_DEPEND(ucom, usb, 1, 1, 1);
|
||||
MODULE_VERSION(ucom, UCOM_MODVER);
|
||||
|
||||
static int
|
||||
ucom_modevent(module_t mod, int type, void *data)
|
||||
{
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
break;
|
||||
case MOD_UNLOAD:
|
||||
break;
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
break;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
ucom_attach(struct ucom_softc *sc)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user