summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/metro-usb.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 22:42:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 22:42:41 +0100
commit159d4d8d5e9416dba78b84d4be10d7b1172728ee (patch)
tree9b2dd746789ba9d7d2aec3511786be88c311b780 /drivers/usb/serial/metro-usb.c
parentUSB: serial: metro-usb: convert to use module_usb_serial_driver (diff)
downloadlinux-159d4d8d5e9416dba78b84d4be10d7b1172728ee.tar.xz
linux-159d4d8d5e9416dba78b84d4be10d7b1172728ee.zip
USB: serial: metro-usb: remove the .h file
A driver doesn't need a .h file just for simple things like vendor ids and a private structure. So move it into the .c file instead, saving some overall lines. Cc: Aleksey Babahin <tamerlan311@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/metro-usb.c')
-rw-r--r--drivers/usb/serial/metro-usb.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 919dd47ab46f..d22a603597e8 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -40,15 +40,34 @@
#include <linux/tty_flip.h>
#include <linux/moduleparam.h>
#include <linux/spinlock.h>
-#include <asm/uaccess.h>
#include <linux/errno.h>
-#include "metro-usb.h"
#include <linux/usb/serial.h>
+#include <asm/uaccess.h>
/* 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) },