git: 413346fddb51 - main - usb: use SYSINIT(9) order instead of using non-existing subsystem

Gleb Smirnoff <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7a3a5d.23e40.68c7fd17__31674.8247527116$1786395398$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=413346fddb518562480ed607367f0f295274afbb

commit 413346fddb518562480ed607367f0f295274afbb
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2026-08-10 20:52:25 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2026-08-10 20:52:25 +0000

    usb: use SYSINIT(9) order instead of using non-existing subsystem
    
    Found with:             clang -Werror=assign-enum
    Reviewed by:            markj
    Differential Revision:  https://reviews.freebsd.org/D58710
---
 sys/dev/usb/serial/usb_serial.c | 4 ++--
 sys/dev/usb/serial/usb_serial.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c
index e62bfdb8ff1d..32a930f0dd2d 100644
--- a/sys/dev/usb/serial/usb_serial.c
+++ b/sys/dev/usb/serial/usb_serial.c
@@ -199,7 +199,7 @@ ucom_init(void *arg)
 	ucom_unrhdr = new_unrhdr(0, UCOM_UNIT_MAX - 1, NULL);
 	mtx_init(&ucom_mtx, "UCOM MTX", NULL, MTX_DEF);
 }
-SYSINIT(ucom_init, SI_SUB_KLD - 1, SI_ORDER_ANY, ucom_init, NULL);
+SYSINIT(ucom_init, SI_SUB_KLD, SI_ORDER_FIRST, ucom_init, NULL);
 
 static void
 ucom_uninit(void *arg)
@@ -215,7 +215,7 @@ ucom_uninit(void *arg)
 
 	mtx_destroy(&ucom_mtx);
 }
-SYSUNINIT(ucom_uninit, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_uninit, NULL);
+SYSUNINIT(ucom_uninit, SI_SUB_KLD, SI_ORDER_FIRST, ucom_uninit, NULL);
 
 /*
  * Mark a unit number (the X in cuaUX) as in use.
diff --git a/sys/dev/usb/serial/usb_serial.h b/sys/dev/usb/serial/usb_serial.h
index 01b032ac394c..df881c0e006a 100644
--- a/sys/dev/usb/serial/usb_serial.h
+++ b/sys/dev/usb/serial/usb_serial.h
@@ -202,7 +202,7 @@ struct ucom_softc {
 #define	UCOM_MTX_LOCK(sc) USB_MTX_LOCK((sc)->sc_mtx)
 #define	UCOM_MTX_UNLOCK(sc) USB_MTX_UNLOCK((sc)->sc_mtx)
 #define	UCOM_UNLOAD_DRAIN(x) \
-SYSUNINIT(var, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_drain_all, 0)
+SYSUNINIT(var, SI_SUB_KLD, SI_ORDER_ANY, ucom_drain_all, 0)
 
 #define	ucom_cfg_do_request(udev,com,req,ptr,flags,timo) \
     usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.