From owner-svn-src-all@FreeBSD.ORG Sun May 8 08:22:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51FB2106566B; Sun, 8 May 2011 08:22:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A3AD8FC16; Sun, 8 May 2011 08:22:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p488MC8c036154; Sun, 8 May 2011 08:22:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p488MCEV036152; Sun, 8 May 2011 08:22:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201105080822.p488MCEV036152@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 8 May 2011 08:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221623 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2011 08:22:12 -0000 Author: hselasky Date: Sun May 8 08:22:11 2011 New Revision: 221623 URL: http://svn.freebsd.org/changeset/base/221623 Log: Cleanup usb_notify_addq_compat(). It should not be needed any more. MFC after: 7 days Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Sun May 8 08:18:30 2011 (r221622) +++ head/sys/dev/usb/usb_device.c Sun May 8 08:22:11 2011 (r221623) @@ -2387,77 +2387,6 @@ usbd_get_device_index(struct usb_device } #if USB_HAVE_DEVCTL -/*------------------------------------------------------------------------* - * usb_notify_addq - * - * This function will generate events for dev. - *------------------------------------------------------------------------*/ -#ifndef BURN_BRIDGES -static void -usb_notify_addq_compat(const char *type, struct usb_device *udev) -{ - char *data = NULL; - const char *ntype; - struct malloc_type *mt; - const size_t buf_size = 512; - - /* Convert notify type */ - if (strcmp(type, "ATTACH") == 0) - ntype = "+"; - else if (strcmp(type, "DETACH") == 0) - ntype = "-"; - else - return; - - mtx_lock(&malloc_mtx); - mt = malloc_desc2type("bus"); /* XXX M_BUS */ - mtx_unlock(&malloc_mtx); - if (mt == NULL) - return; - - data = malloc(buf_size, mt, M_NOWAIT); - if (data == NULL) - return; - - /* String it all together. */ - snprintf(data, buf_size, - "%s" -#if USB_HAVE_UGEN - "%s " -#endif - "at port=%u " - "vendor=0x%04x " - "product=0x%04x " - "devclass=0x%02x " - "devsubclass=0x%02x " - "sernum=\"%s\" " - "release=0x%04x " -#if USB_HAVE_UGEN - "on %s\n" -#endif - "", - ntype, -#if USB_HAVE_UGEN - udev->ugen_name, -#endif - udev->port_no, - UGETW(udev->ddesc.idVendor), - UGETW(udev->ddesc.idProduct), - udev->ddesc.bDeviceClass, - udev->ddesc.bDeviceSubClass, - usb_get_serial(udev), - UGETW(udev->ddesc.bcdDevice) -#if USB_HAVE_UGEN - , udev->parent_hub != NULL ? - udev->parent_hub->ugen_name : - device_get_nameunit(device_get_parent(udev->bus->bdev)) -#endif - ); - - devctl_queue_data(data); -} -#endif - static void usb_notify_addq(const char *type, struct usb_device *udev) { @@ -2465,10 +2394,6 @@ usb_notify_addq(const char *type, struct struct sbuf *sb; int i; -#ifndef BURN_BRIDGES - usb_notify_addq_compat(type, udev); -#endif - /* announce the device */ sb = sbuf_new_auto(); sbuf_printf(sb,