Date: Thu, 25 Nov 2010 22:56:27 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215846 - in head/sys/dev/usb: . controller Message-ID: <201011252256.oAPMuR11020179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: weongyo Date: Thu Nov 25 22:56:26 2010 New Revision: 215846 URL: http://svn.freebsd.org/changeset/base/215846 Log: Removes a unused function `usb_bus_find'. Modified: head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/usb_controller.h Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Thu Nov 25 22:19:40 2010 (r215845) +++ head/sys/dev/usb/controller/usb_controller.c Thu Nov 25 22:56:26 2010 (r215846) @@ -602,29 +602,3 @@ usb_bus_mem_free_all(struct usb_bus *bus mtx_destroy(&bus->bus_mtx); } -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); -} Modified: head/sys/dev/usb/usb_controller.h ============================================================================== --- head/sys/dev/usb/usb_controller.h Thu Nov 25 22:19:40 2010 (r215845) +++ head/sys/dev/usb/usb_controller.h Thu Nov 25 22:56:26 2010 (r215846) @@ -221,6 +221,5 @@ void usb_bus_mem_free_all(struct usb_bus uint16_t usb_isoc_time_expand(struct usb_bus *bus, uint16_t isoc_time_curr); uint16_t usbd_fs_isoc_schedule_isoc_time_expand(struct usb_device *udev, struct usb_fs_isoc_schedule **pp_start, struct usb_fs_isoc_schedule **pp_end, uint16_t isoc_time); uint8_t usbd_fs_isoc_schedule_alloc(struct usb_fs_isoc_schedule *fss, uint8_t *pstart, uint16_t len); -struct usb_bus *usb_bus_find(const char *name); #endif /* _USB_CONTROLLER_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011252256.oAPMuR11020179>