Deleted Added
full compact
1c1
< /* $FreeBSD: head/sys/dev/usb/controller/usb_controller.c 213435 2010-10-04 23:18:05Z hselasky $ */
---
> /* $FreeBSD: head/sys/dev/usb/controller/usb_controller.c 215649 2010-11-22 01:11:28Z weongyo $ */
63a64
> #include <dev/usb/usb_pf.h>
549a551,552
> usbpf_attach(bus, &bus->uif);
>
596a600,601
> usbpf_detach(bus);
>
598a604,630
>
> struct usb_bus *
> usb_bus_find(const char *name)
> {
> struct usb_bus *ubus;
> devclass_t dc;
> device_t *devlist;
> int devcount, error, i;
> const char *nameunit;
>
> dc = devclass_find("usbus");
> if (dc == NULL)
> return (NULL);
> error = devclass_get_devices(dc, &devlist, &devcount);
> if (error != 0)
> return (NULL);
> for (i = 0; i < devcount; i++) {
> nameunit = device_get_nameunit(devlist[i]);
> if (!strncmp(name, nameunit, strlen(nameunit))) {
> ubus = device_get_ivars(devlist[i]);
> free(devlist, M_TEMP);
> return (ubus);
> }
> }
> free(devlist, M_TEMP);
> return (NULL);
> }