svn commit: r213676 - in user/weongyo/usb/sys/dev/usb: . controller
Weongyo Jeong
weongyo at FreeBSD.org
Sun Oct 10 22:11:39 UTC 2010
Author: weongyo
Date: Sun Oct 10 22:11:38 2010
New Revision: 213676
URL: http://svn.freebsd.org/changeset/base/213676
Log:
Reverts r213675 that already the device tree knows how to find it using
devclass_find(9).
Pointed by: yongari
Modified:
user/weongyo/usb/sys/dev/usb/controller/usb_controller.c
user/weongyo/usb/sys/dev/usb/usb_bus.h
user/weongyo/usb/sys/dev/usb/usb_controller.h
Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Sun Oct 10 21:40:35 2010 (r213675)
+++ user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Sun Oct 10 22:11:38 2010 (r213676)
@@ -72,8 +72,6 @@ static void usb_bus_mem_free_all(struct
/* static variables */
-static TAILQ_HEAD(, usb_bus) usb_bus_head;
-
#ifdef USB_DEBUG
static int usb_ctrl_debug = 0;
@@ -542,9 +540,6 @@ usb_bus_struct_init(struct usb_bus *bus,
/* get all DMA memory */
if (usb_bus_mem_alloc_all(bus, USB_GET_DMA_TAG(dev)))
return (ENOMEM);
-
- TAILQ_INSERT_TAIL(&usb_bus_head, bus, bus_link);
-
return (0);
}
@@ -552,31 +547,6 @@ void
usb_bus_struct_fini(struct usb_bus *bus)
{
- TAILQ_REMOVE(&usb_bus_head, bus, bus_link);
-
usb_bus_mem_free_all(bus);
mtx_destroy(&bus->bus_mtx);
}
-
-struct usb_bus *
-usb_bus_find(const char *name)
-{
- struct usb_bus *bus;
- const char *nameunit;
-
- TAILQ_FOREACH(bus, &usb_bus_head, bus_link) {
- nameunit = device_get_nameunit(bus->bdev);
- if (!strncmp(nameunit, name, strlen(nameunit)))
- return (bus);
- }
- return (NULL);
-}
-
-static void
-usb_bus_first(void *arg)
-{
-
- TAILQ_INIT(&usb_bus_head);
-}
-
-SYSINIT(usb_bus_first, SI_SUB_KLD, SI_ORDER_FIRST, usb_bus_first, NULL);
Modified: user/weongyo/usb/sys/dev/usb/usb_bus.h
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_bus.h Sun Oct 10 21:40:35 2010 (r213675)
+++ user/weongyo/usb/sys/dev/usb/usb_bus.h Sun Oct 10 22:11:38 2010 (r213676)
@@ -103,8 +103,6 @@ struct usb_bus {
struct usb_temp_setup temp_setup[1];
uint8_t data[255];
} scratch[1];
-
- TAILQ_ENTRY(usb_bus) bus_link;
};
#endif /* _USB_BUS_H_ */
Modified: user/weongyo/usb/sys/dev/usb/usb_controller.h
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_controller.h Sun Oct 10 21:40:35 2010 (r213675)
+++ user/weongyo/usb/sys/dev/usb/usb_controller.h Sun Oct 10 22:11:38 2010 (r213676)
@@ -199,7 +199,6 @@ int usb_bus_struct_init(struct usb_bus
void (*busmem_func)(struct usb_bus *,
usb_bus_mem_callback_t *));
void usb_bus_struct_fini(struct usb_bus *bus);
-struct usb_bus *usb_bus_find(const char *name);
void usb_bus_mem_flush_all(struct usb_bus *bus);
uint16_t usb_isoc_time_expand(struct usb_bus *bus,
uint16_t isoc_time_curr);
More information about the svn-src-user
mailing list