[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch 02/06] ti_usb, cleanup: comments, whitespace



 * 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-source-2.6.18/drivers/usb/serial/ti_usb_3410_5052.c
===================================================================
--- linux-source-2.6.18.orig/drivers/usb/serial/ti_usb_3410_5052.c	2007-02-23 09:05:44.450588750 +0100
+++ linux-source-2.6.18/drivers/usb/serial/ti_usb_3410_5052.c	2007-02-23 09:12:43.276763750 +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 <alborchers@steinerpoint.com>, or
- * Peter Berger <pberger@brimson.com>.
- * 
- * 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 <alborchers@steinerpoint.com>.
  */
 
 #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 = {
@@ -451,7 +400,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) {
@@ -486,7 +435,7 @@
 		usb_set_serial_port_data(serial->port[i], tport);
 		tport->tp_uart_mode = 0;	/* default is RS232 */
 	}
-	
+
 	return 0;
 
 free_tports:
@@ -533,8 +482,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);
@@ -550,7 +499,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;
@@ -676,7 +625,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)
@@ -749,7 +698,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);
@@ -956,7 +905,7 @@
 		}
 	} else {
 		config->wFlags &= ~TI_UART_ENABLE_PARITY_CHECKING;
-		config->bParity = TI_UART_NO_PARITY; 	
+		config->bParity = TI_UART_NO_PARITY;
 	}
 
 	if (cflag & CSTOPB)
@@ -1336,7 +1285,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-source-2.6.18/drivers/usb/serial/ti_usb_3410_5052.h
===================================================================
--- linux-source-2.6.18.orig/drivers/usb/serial/ti_usb_3410_5052.h	2007-02-23 09:05:44.470590000 +0100
+++ linux-source-2.6.18/drivers/usb/serial/ti_usb_3410_5052.h	2007-02-23 09:12:43.276763750 +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 <alborchers@steinerpoint.com>, or
- * Peter Berger <pberger@brimson.com>.
+ * technical support, or Al Borchers <alborchers@steinerpoint.com>.
  */
 
 #ifndef _TI_3410_5052_H_

--



Reply to: