svn commit: r212596 - user/weongyo/usb/sys/dev/usb/controller
Weongyo Jeong
weongyo at FreeBSD.org
Tue Sep 14 02:05:08 UTC 2010
Author: weongyo
Date: Tue Sep 14 02:05:08 2010
New Revision: 212596
URL: http://svn.freebsd.org/changeset/base/212596
Log:
Initializes `bus->generation' when the USB bus structure is initialized
that don't need to check it whenever usb_bus_explore() is called because
it'd not be decreased.
Modified:
user/weongyo/usb/sys/dev/usb/controller/usb_controller.c
Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Tue Sep 14 01:52:16 2010 (r212595)
+++ user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Tue Sep 14 02:05:08 2010 (r212596)
@@ -198,10 +198,6 @@ usb_bus_explore(void *arg, int npending)
bus->do_probe = 0;
bus->generation++;
}
- if (bus->generation == 0) {
- /* avoid zero, hence that is memory default */
- bus->generation = 1;
- }
#ifdef DDB
/*
@@ -541,6 +537,7 @@ usb_bus_struct_init(struct usb_bus *bus,
bus->devices_max = udevsmax;
bus->busmem_func = busmem_func;
bus->alloc_failed = 0;
+ bus->generation = 1;
mtx_init(&bus->bus_mtx, device_get_nameunit(bus->parent),
NULL, MTX_DEF);
More information about the svn-src-user
mailing list