[patch 01/05] ti_usb, cleanup: comments, whitespace

Oleg Verych <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
ti_usb-firmwareless-intro.patch (text/plain, 5.3 KB)
 * Al Borchers remains one to bother with this driver,
 * shell script is not needed in comments.

pp-by: Oleg Verych
---
 drivers/usb/serial/ti_usb_3410_5052.c | 73 +++++-----------------------------
 drivers/usb/serial/ti_usb_3410_5052.h |  3 -
 2 files changed, 12 insertions(+), 64 deletions(-)

Index: linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.c
===================================================================
--- linux-2.6.21-rc1.orig/drivers/usb/serial/ti_usb_3410_5052.c	2007-02-23 02:09:56.916462750 +0100
+++ linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.c	2007-02-23 02:11:36.886710500 +0100
@@ -14,58 +14,7 @@
  * (at your option) any later version.
  *
  * For questions or problems with this driver, contact Texas Instruments
- * technical support, or Al Borchers <[email protected]>, or
- * Peter Berger <[email protected]>.
- * 
- * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
- * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
- * configuration.
- *
- * #!/bin/bash
- *
- * BOOT_CONFIG=1
- * ACTIVE_CONFIG=2
- *
- * if [[ "$ACTION" != "add" ]]
- * then
- * 	exit
- * fi
- *
- * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
- *
- * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
- * then
- * 	exit
- * fi
- *
- * PRODUCT=${PRODUCT%/?*}		# delete version
- * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
- * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
- *
- * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
- *
- * function scan() {
- * 	s=$1
- * 	shift
- * 	for i
- * 	do
- * 		if [[ $s -eq $i ]]
- * 		then
- * 			return 0
- * 		fi
- * 	done
- * 	return 1
- * }
- *
- * IFS=$IFS,
- *
- * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
- * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
- * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
- * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
- * then
- * 	echo $ACTIVE_CONFIG > $CONFIG_PATH
- * fi
+ * technical support, or Al Borchers <[email protected]>.
  */
 
 #include <linux/kernel.h>
@@ -253,7 +202,7 @@
 	.probe			= usb_serial_probe,
 	.disconnect		= usb_serial_disconnect,
 	.id_table		= ti_id_table_combined,
-	.no_dynamic_id = 	1,
+	.no_dynamic_id =	1,
 };
 
 static struct usb_serial_driver ti_1port_device = {
@@ -453,7 +402,7 @@
 
 		status = -ENODEV;
 		goto free_tdev;
-	} 
+	}
 
 	/* the second configuration must be set (in sysfs by hotplug script) */
 	if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
@@ -487,7 +436,7 @@
 		usb_set_serial_port_data(serial->port[i], tport);
 		tport->tp_uart_mode = 0;	/* default is RS232 */
 	}
-	
+
 	return 0;
 
 free_tports:
@@ -534,8 +483,8 @@
 	struct urb *urb;
 	int port_number;
 	int status;
-	__u16 open_settings = (__u8)(TI_PIPE_MODE_CONTINOUS | 
-			     TI_PIPE_TIMEOUT_ENABLE | 
+	__u16 open_settings = (__u8)(TI_PIPE_MODE_CONTINOUS |
+			     TI_PIPE_TIMEOUT_ENABLE |
 			     (TI_TRANSFER_TIMEOUT << 2));
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
@@ -551,7 +500,7 @@
 		return -ERESTARTSYS;
 
 	if (port->tty)
-		port->tty->low_latency = 
+		port->tty->low_latency =
 			(tport->tp_flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
 	port_number = port->number - port->serial->minor;
@@ -677,7 +626,7 @@
 	int do_up;
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
-			 
+
 	tdev = usb_get_serial_data(port->serial);
 	tport = usb_get_serial_port_data(port);
 	if (tdev == NULL || tport == NULL)
@@ -750,7 +699,7 @@
 
 	if (tport == NULL)
 		return -ENODEV;
-	
+
 	spin_lock_irqsave(&tport->tp_lock, flags);
 	room = ti_buf_space_avail(tport->tp_write_buf);
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
@@ -957,7 +906,7 @@
 		}
 	} else {
 		config->wFlags &= ~TI_UART_ENABLE_PARITY_CHECKING;
-		config->bParity = TI_UART_NO_PARITY; 	
+		config->bParity = TI_UART_NO_PARITY;
 	}
 
 	if (cflag & CSTOPB)
@@ -1337,7 +1286,7 @@
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	if (result) {
 		dev_err(&port->dev, "%s - submit write urb failed, %d\n", __FUNCTION__, result);
-		tport->tp_write_urb_in_use = 0; 
+		tport->tp_write_urb_in_use = 0;
 		/* TODO: reschedule ti_send */
 	} else {
 		spin_lock_irqsave(&tport->tp_lock, flags);
Index: linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.h
===================================================================
--- linux-2.6.21-rc1.orig/drivers/usb/serial/ti_usb_3410_5052.h	2007-02-23 02:09:49.399993000 +0100
+++ linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.h	2007-02-23 02:13:47.918899500 +0100
@@ -14,8 +14,7 @@
  * (at your option) any later version.
  *
  * For questions or problems with this driver, contact Texas Instruments
- * technical support, or Al Borchers <[email protected]>, or
- * Peter Berger <[email protected]>.
+ * technical support, or Al Borchers <[email protected]>.
  */
 
 #ifndef _TI_3410_5052_H_

--


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.