Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Feb 2009 17:20:00 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189173 - head/sys/dev/usb
Message-ID:  <200902281720.n1SHK0Mq015657@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902281720.n1SHK0Mq015657>