Re: [issue1866] [PATCH] ucom - destroy device node on detach

看板DFBSD_submit作者時間15年前 (2010/10/07 12:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
> Hey, Hi, > Just for readability, I think it would be better not to have two = on the same > line here. Well, it's common in C for assigning the same value to multiple variables that way, but I don't insist on that point here :) I'm going to commit this in a few days if no objections raised. Cheers. diff --git a/sys/dev/usbmisc/ucom/ucom.c b/sys/dev/usbmisc/ucom/ucom.c index f85c3b7..66ccc53 100644 --- a/sys/dev/usbmisc/ucom/ucom.c +++ b/sys/dev/usbmisc/ucom/ucom.c @@ -181,6 +181,7 @@ ucom_attach(struct ucom_softc *sc) UID_UUCP, GID_DIALER, 0660, "ucom%d", unit); dev->si_tty = tp; + sc->dev = dev; lwkt_reltoken(&tty_token); return (0); @@ -194,6 +195,7 @@ ucom_detach(struct ucom_softc *sc) DPRINTF(("ucom_detach: sc = %p, tp = %p\n", sc, sc->sc_tty)); + destroy_dev(sc->dev); lwkt_gettoken(&tty_token); sc->sc_dying = 1; -- 1.7.0.5
文章代碼(AID): #1ChKr6xX (DFBSD_submit)
文章代碼(AID): #1ChKr6xX (DFBSD_submit)