From bc9c1a20c1363a1fd587b9c4dfb583b244134c2d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 8 Mar 2012 13:42:41 -0800 Subject: [PATCH] --- yaml --- r: 289663 b: refs/heads/master c: 159d4d8d5e9416dba78b84d4be10d7b1172728ee h: refs/heads/master i: 289661: 4ce01d39b80d5fb1d54d38638d82697f874a6955 289659: e2ab4d5f9f86cdc1e71bce4e945c6249aeec9fcf 289655: 7ac3a97a5533506c7a4d69b0e48f308486e4db7d 289647: 72988874d56898b1954ae243ef78da51d91131b3 289631: ff0f06dc2b53830ccc5cbb36bf98b99bf75d1ccb 289599: 8de44224eaaa22660b148232459f26f327d1819d 289535: e97f628203cb8cc611e513f17fa969002b8fb0c3 v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/metro-usb.c | 23 ++++++++++-- trunk/drivers/usb/serial/metro-usb.h | 52 ---------------------------- 3 files changed, 22 insertions(+), 55 deletions(-) delete mode 100644 trunk/drivers/usb/serial/metro-usb.h diff --git a/[refs] b/[refs] index d7eb5e2118f7..7f279e13b425 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1935e357bb2a3031772730293a3725e3cca07778 +refs/heads/master: 159d4d8d5e9416dba78b84d4be10d7b1172728ee diff --git a/trunk/drivers/usb/serial/metro-usb.c b/trunk/drivers/usb/serial/metro-usb.c index 919dd47ab46f..d22a603597e8 100644 --- a/trunk/drivers/usb/serial/metro-usb.c +++ b/trunk/drivers/usb/serial/metro-usb.c @@ -40,15 +40,34 @@ #include #include #include -#include #include -#include "metro-usb.h" #include +#include /* Version Information */ #define DRIVER_VERSION "v1.2.0.0" #define DRIVER_DESC "Metrologic Instruments Inc. - USB-POS driver" +/* Product information. */ +#define FOCUS_VENDOR_ID 0x0C2E +#define FOCUS_PRODUCT_ID 0x0720 +#define FOCUS_PRODUCT_ID_UNI 0x0710 + +#define METROUSB_SET_REQUEST_TYPE 0x40 +#define METROUSB_SET_MODEM_CTRL_REQUEST 10 +#define METROUSB_SET_BREAK_REQUEST 0x40 +#define METROUSB_MCR_NONE 0x08 /* Deactivate DTR and RTS. */ +#define METROUSB_MCR_RTS 0x0a /* Activate RTS. */ +#define METROUSB_MCR_DTR 0x09 /* Activate DTR. */ +#define WDR_TIMEOUT 5000 /* default urb timeout. */ + +/* Private data structure. */ +struct metrousb_private { + spinlock_t lock; + int throttled; + unsigned long control_state; +}; + /* Device table list. */ static struct usb_device_id id_table [] = { { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID) }, diff --git a/trunk/drivers/usb/serial/metro-usb.h b/trunk/drivers/usb/serial/metro-usb.h deleted file mode 100644 index 0367b6c8df07..000000000000 --- a/trunk/drivers/usb/serial/metro-usb.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Date Created: 1/12/2007 - File Name: metro-usb.h - Description: metro-usb.h is the drivers header file. The driver is a USB to Serial converter. - The driver takes USB data and sends it to a virtual ttyUSB# serial port. - The driver interfaces with the usbserial.ko driver supplied by Linux. - - NOTES: - To install the driver: - 1. Install the usbserial.ko module supplied by Linux with: # insmod usbserial.ko - 2. Install the metro-usb.ko module with: # insmod metro-usb.ko vender=0x#### product=0x#### debug=1 - The vendor, product and debug parameters are optional. - - Copyright: 2007 Metrologic Instruments. All rights reserved. - Copyright: 2011 Azimut Ltd. - Requirements: Notepad.exe - - Revision History: - - Date: Developer: Revisions: - ------------------------------------------------------------------------------ - 1/12/2007 Philip Nicastro Initial release. (v1.0.0.0) - 10/07/2011 Aleksey Babahin Update for new kernel (tested on 2.6.38) - Add unidirection mode support - - -*/ - -#ifndef __LINUX_USB_SERIAL_METRO -#define __LINUX_USB_SERIAL_METRO - -/* Product information. */ -#define FOCUS_VENDOR_ID 0x0C2E -#define FOCUS_PRODUCT_ID 0x0720 -#define FOCUS_PRODUCT_ID_UNI 0x0710 - -#define METROUSB_SET_REQUEST_TYPE 0x40 -#define METROUSB_SET_MODEM_CTRL_REQUEST 10 -#define METROUSB_SET_BREAK_REQUEST 0x40 -#define METROUSB_MCR_NONE 0x8 /* Deactivate DTR and RTS. */ -#define METROUSB_MCR_RTS 0xa /* Activate RTS. */ -#define METROUSB_MCR_DTR 0x9 /* Activate DTR. */ -#define WDR_TIMEOUT 5000 /* default urb timeout. */ - -/* Private data structure. */ -struct metrousb_private { - spinlock_t lock; - int throttled; - unsigned long control_state; -}; - -#endif