DragonFly BSD
DragonFly submit List (threaded) for 2010-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: YONETANI Tomokazu <qhwt.dfly@xxxxxxxxxx>
Date: Thu, 7 Oct 2010 13:09:21 +0900

> 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




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]