From owner-svn-src-all@FreeBSD.ORG Sat Feb 28 17:20:01 2009 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 0A107106567B; Sat, 28 Feb 2009 17:20:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E96CB8FC13; Sat, 28 Feb 2009 17:20:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHK0xb015660; Sat, 28 Feb 2009 17:20:00 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHK0Mq015657; Sat, 28 Feb 2009 17:20:00 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200902281720.n1SHK0Mq015657@svn.freebsd.org> From: Andrew Thompson Date: Sat, 28 Feb 2009 17:20:00 +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: r189173 - 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: Sat, 28 Feb 2009 17:20:03 -0000 Author: thompsa Date: Sat Feb 28 17:20:00 2009 New Revision: 189173 URL: http://svn.freebsd.org/changeset/base/189173 Log: A couple of style nits in the last commit - unwrap short lines - move variable initialisation out of the declaration. Modified: head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Sat Feb 28 17:14:03 2009 (r189172) +++ head/sys/dev/usb/usb_dev.c Sat Feb 28 17:20:00 2009 (r189173) @@ -473,8 +473,7 @@ usb2_fifo_create(struct usb2_cdev_privda /* Check TX FIFO */ if (is_tx && (udev->fifo[n + USB_FIFO_TX] == NULL)) { - pipe = usb2_dev_get_pipe(udev, - ep, USB_FIFO_TX); + pipe = usb2_dev_get_pipe(udev, ep, USB_FIFO_TX); DPRINTFN(5, "dev_get_pipe(%d, 0x%x)\n", ep, USB_FIFO_TX); if (pipe == NULL) { DPRINTFN(5, "dev_get_pipe returned NULL\n"); @@ -501,8 +500,7 @@ usb2_fifo_create(struct usb2_cdev_privda if (is_rx && (udev->fifo[n + USB_FIFO_RX] == NULL)) { - pipe = usb2_dev_get_pipe(udev, - ep, USB_FIFO_RX); + pipe = usb2_dev_get_pipe(udev, ep, USB_FIFO_RX); DPRINTFN(5, "dev_get_pipe(%d, 0x%x)\n", ep, USB_FIFO_RX); if (pipe == NULL) { DPRINTFN(5, "dev_get_pipe returned NULL\n"); @@ -598,8 +596,7 @@ usb2_fifo_free(struct usb2_fifo *f) } static struct usb2_pipe * -usb2_dev_get_pipe(struct usb2_device *udev, - uint8_t ep_index, uint8_t dir) +usb2_dev_get_pipe(struct usb2_device *udev, uint8_t ep_index, uint8_t dir) { struct usb2_pipe *pipe; uint8_t ep_dir; Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Sat Feb 28 17:14:03 2009 (r189172) +++ head/sys/dev/usb/usb_device.c Sat Feb 28 17:20:00 2009 (r189173) @@ -1722,8 +1722,7 @@ usb2_make_dev(struct usb2_device *udev, /* Now, create the device itself */ snprintf(devname, sizeof(devname), "%u.%u.%u", - pd->bus_index, pd->dev_index, - pd->ep_addr); + pd->bus_index, pd->dev_index, pd->ep_addr); pd->cdev = make_dev(&usb2_devsw, 0, UID_ROOT, GID_OPERATOR, 0600, USB_DEVICE_DIR "/%s", devname); pd->cdev->si_drv1 = pd; @@ -1734,7 +1733,7 @@ usb2_make_dev(struct usb2_device *udev, static void usb2_cdev_create(struct usb2_device *udev) { - struct usb2_config_descriptor *cd = usb2_get_config_descriptor(udev); + struct usb2_config_descriptor *cd; struct usb2_endpoint_descriptor *ed; struct usb2_descriptor *desc; struct usb2_fs_privdata* pd; @@ -1762,6 +1761,7 @@ usb2_cdev_create(struct usb2_device *ude * Collect all used endpoint numbers instead of just * generating 16 static endpoints. */ + cd = usb2_get_config_descriptor(udev); while ((desc = usb2_desc_foreach(cd, desc))) { /* filter out all endpoint descriptors */ if ((desc->bDescriptorType == UDESC_ENDPOINT) &&