diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 16:42:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 16:42:41 -0500 |
commit | 159d4d8d5e9416dba78b84d4be10d7b1172728ee (patch) | |
tree | 9b2dd746789ba9d7d2aec3511786be88c311b780 /drivers/usb | |
parent | 1935e357bb2a3031772730293a3725e3cca07778 (diff) |
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')
-rw-r--r-- | drivers/usb/serial/metro-usb.c | 23 | ||||
-rw-r--r-- | drivers/usb/serial/metro-usb.h | 52 |
2 files changed, 21 insertions, 54 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 @@ | |||
40 | #include <linux/tty_flip.h> | 40 | #include <linux/tty_flip.h> |
41 | #include <linux/moduleparam.h> | 41 | #include <linux/moduleparam.h> |
42 | #include <linux/spinlock.h> | 42 | #include <linux/spinlock.h> |
43 | #include <asm/uaccess.h> | ||
44 | #include <linux/errno.h> | 43 | #include <linux/errno.h> |
45 | #include "metro-usb.h" | ||
46 | #include <linux/usb/serial.h> | 44 | #include <linux/usb/serial.h> |
45 | #include <asm/uaccess.h> | ||
47 | 46 | ||
48 | /* Version Information */ | 47 | /* Version Information */ |
49 | #define DRIVER_VERSION "v1.2.0.0" | 48 | #define DRIVER_VERSION "v1.2.0.0" |
50 | #define DRIVER_DESC "Metrologic Instruments Inc. - USB-POS driver" | 49 | #define DRIVER_DESC "Metrologic Instruments Inc. - USB-POS driver" |
51 | 50 | ||
51 | /* Product information. */ | ||
52 | #define FOCUS_VENDOR_ID 0x0C2E | ||
53 | #define FOCUS_PRODUCT_ID 0x0720 | ||
54 | #define FOCUS_PRODUCT_ID_UNI 0x0710 | ||
55 | |||
56 | #define METROUSB_SET_REQUEST_TYPE 0x40 | ||
57 | #define METROUSB_SET_MODEM_CTRL_REQUEST 10 | ||
58 | #define METROUSB_SET_BREAK_REQUEST 0x40 | ||
59 | #define METROUSB_MCR_NONE 0x08 /* Deactivate DTR and RTS. */ | ||
60 | #define METROUSB_MCR_RTS 0x0a /* Activate RTS. */ | ||
61 | #define METROUSB_MCR_DTR 0x09 /* Activate DTR. */ | ||
62 | #define WDR_TIMEOUT 5000 /* default urb timeout. */ | ||
63 | |||
64 | /* Private data structure. */ | ||
65 | struct metrousb_private { | ||
66 | spinlock_t lock; | ||
67 | int throttled; | ||
68 | unsigned long control_state; | ||
69 | }; | ||
70 | |||
52 | /* Device table list. */ | 71 | /* Device table list. */ |
53 | static struct usb_device_id id_table [] = { | 72 | static struct usb_device_id id_table [] = { |
54 | { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID) }, | 73 | { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID) }, |
diff --git a/drivers/usb/serial/metro-usb.h b/drivers/usb/serial/metro-usb.h deleted file mode 100644 index 0367b6c8df07..000000000000 --- a/drivers/usb/serial/metro-usb.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | Date Created: 1/12/2007 | ||
3 | File Name: metro-usb.h | ||
4 | Description: metro-usb.h is the drivers header file. The driver is a USB to Serial converter. | ||
5 | The driver takes USB data and sends it to a virtual ttyUSB# serial port. | ||
6 | The driver interfaces with the usbserial.ko driver supplied by Linux. | ||
7 | |||
8 | NOTES: | ||
9 | To install the driver: | ||
10 | 1. Install the usbserial.ko module supplied by Linux with: # insmod usbserial.ko | ||
11 | 2. Install the metro-usb.ko module with: # insmod metro-usb.ko vender=0x#### product=0x#### debug=1 | ||
12 | The vendor, product and debug parameters are optional. | ||
13 | |||
14 | Copyright: 2007 Metrologic Instruments. All rights reserved. | ||
15 | Copyright: 2011 Azimut Ltd. <http://azimutrzn.ru/> | ||
16 | Requirements: Notepad.exe | ||
17 | |||
18 | Revision History: | ||
19 | |||
20 | Date: Developer: Revisions: | ||
21 | ------------------------------------------------------------------------------ | ||
22 | 1/12/2007 Philip Nicastro Initial release. (v1.0.0.0) | ||
23 | 10/07/2011 Aleksey Babahin Update for new kernel (tested on 2.6.38) | ||
24 | Add unidirection mode support | ||
25 | |||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef __LINUX_USB_SERIAL_METRO | ||
30 | #define __LINUX_USB_SERIAL_METRO | ||
31 | |||
32 | /* Product information. */ | ||
33 | #define FOCUS_VENDOR_ID 0x0C2E | ||
34 | #define FOCUS_PRODUCT_ID 0x0720 | ||
35 | #define FOCUS_PRODUCT_ID_UNI 0x0710 | ||
36 | |||
37 | #define METROUSB_SET_REQUEST_TYPE 0x40 | ||
38 | #define METROUSB_SET_MODEM_CTRL_REQUEST 10 | ||
39 | #define METROUSB_SET_BREAK_REQUEST 0x40 | ||
40 | #define METROUSB_MCR_NONE 0x8 /* Deactivate DTR and RTS. */ | ||
41 | #define METROUSB_MCR_RTS 0xa /* Activate RTS. */ | ||
42 | #define METROUSB_MCR_DTR 0x9 /* Activate DTR. */ | ||
43 | #define WDR_TIMEOUT 5000 /* default urb timeout. */ | ||
44 | |||
45 | /* Private data structure. */ | ||
46 | struct metrousb_private { | ||
47 | spinlock_t lock; | ||
48 | int throttled; | ||
49 | unsigned long control_state; | ||
50 | }; | ||
51 | |||
52 | #endif | ||