# HG changeset patch # User Thinker K.F. Li # Date 1215491489 -28800 # Node ID e59963b503cbdc336b10e84e83cedb496aa6738b # Parent 5fa5e5199d1a1ffbb0c38fa208e2eb96e20222ad Remove tedious messages. diff -r 5fa5e5199d1a -r e59963b503cb vordog.c --- a/vordog.c Tue Jul 08 12:21:12 2008 +0800 +++ b/vordog.c Tue Jul 08 12:31:29 2008 +0800 @@ -57,7 +57,6 @@ vordog_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { vd_softc_t sc; - printf("vordog_open\n"); sc = CDEV_2_SOFTC(dev); sc->open_cnt++; @@ -68,7 +67,6 @@ vordog_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { vd_softc_t sc; - printf("vordog_close\n"); sc = CDEV_2_SOFTC(dev); sc->open_cnt--; @@ -81,22 +79,18 @@ device_t vd_dev, nexus_dev; int r; - printf("go_detach 1\n"); vd_dc = devclass_find("vordog"); if(vd_dc == NULL) return EINVAL; - printf("go_detach 2\n"); vd_dev = devclass_get_device(vd_dc, 0); if(vd_dev == NULL) return EINVAL; - printf("go_detach 3\n"); nexus_dev = device_get_parent(vd_dev); if(nexus_dev == NULL) return EINVAL; - printf("go_detach 4\n"); r = device_delete_child(nexus_dev, vd_dev); return r; } @@ -157,6 +151,10 @@ .d_name = "vordog", }; +/* Following implements a new bus device. + * It is attached under nexus bus, an on board device as `vordog0'. + */ + static void vordog_identify(driver_t *driver, device_t parent) { device_t vordog;