aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/airprime.c2
-rw-r--r--drivers/usb/serial/anydata.c2
-rw-r--r--drivers/usb/serial/ark3116.c2
-rw-r--r--drivers/usb/serial/belkin_sa.c2
-rw-r--r--drivers/usb/serial/bus.c2
-rw-r--r--drivers/usb/serial/console.c3
-rw-r--r--drivers/usb/serial/cp2101.c2
-rw-r--r--drivers/usb/serial/cyberjack.c2
-rw-r--r--drivers/usb/serial/cypress_m8.c2
-rw-r--r--drivers/usb/serial/digi_acceleport.c2
-rw-r--r--drivers/usb/serial/empeg.c2
-rw-r--r--drivers/usb/serial/ezusb.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c2
-rw-r--r--drivers/usb/serial/funsoft.c2
-rw-r--r--drivers/usb/serial/garmin_gps.c3
-rw-r--r--drivers/usb/serial/generic.c2
-rw-r--r--drivers/usb/serial/hp4x.c2
-rw-r--r--drivers/usb/serial/io_edgeport.c2
-rw-r--r--drivers/usb/serial/io_ti.c2
-rw-r--r--drivers/usb/serial/ipaq.c2
-rw-r--r--drivers/usb/serial/ipw.c2
-rw-r--r--drivers/usb/serial/ir-usb.c2
-rw-r--r--drivers/usb/serial/keyspan.c2
-rw-r--r--drivers/usb/serial/keyspan_pda.c3
-rw-r--r--drivers/usb/serial/kl5kusb105.c2
-rw-r--r--drivers/usb/serial/kobil_sct.c2
-rw-r--r--drivers/usb/serial/mct_u232.c2
-rw-r--r--drivers/usb/serial/navman.c2
-rw-r--r--drivers/usb/serial/omninet.c2
-rw-r--r--drivers/usb/serial/option.c2
-rw-r--r--drivers/usb/serial/pl2303.c2
-rw-r--r--drivers/usb/serial/safe_serial.c2
-rw-r--r--drivers/usb/serial/sierra.c2
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c2
-rw-r--r--drivers/usb/serial/usb-serial.c2
-rw-r--r--drivers/usb/serial/usb-serial.h300
-rw-r--r--drivers/usb/serial/visor.c2
-rw-r--r--drivers/usb/serial/whiteheat.c2
38 files changed, 37 insertions, 340 deletions
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index 94b9ba0ff875..62082532a8b3 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -13,7 +13,7 @@
13#include <linux/tty.h> 13#include <linux/tty.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/usb.h> 15#include <linux/usb.h>
16#include "usb-serial.h" 16#include <linux/usb/serial.h>
17 17
18static struct usb_device_id id_table [] = { 18static struct usb_device_id id_table [] = {
19 { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */ 19 { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
diff --git a/drivers/usb/serial/anydata.c b/drivers/usb/serial/anydata.c
index dadf2838f942..01843ef8c11e 100644
--- a/drivers/usb/serial/anydata.c
+++ b/drivers/usb/serial/anydata.c
@@ -13,7 +13,7 @@
13#include <linux/tty.h> 13#include <linux/tty.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/usb.h> 15#include <linux/usb.h>
16#include "usb-serial.h" 16#include <linux/usb/serial.h>
17 17
18static struct usb_device_id id_table [] = { 18static struct usb_device_id id_table [] = {
19 { USB_DEVICE(0x16d5, 0x6501) }, /* AirData CDMA device */ 19 { USB_DEVICE(0x16d5, 0x6501) }, /* AirData CDMA device */
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 8dec796222a0..970d9ef0a7a5 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -21,7 +21,7 @@
21#include <linux/tty.h> 21#include <linux/tty.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/usb.h> 23#include <linux/usb.h>
24#include "usb-serial.h" 24#include <linux/usb/serial.h>
25 25
26 26
27static int debug; 27static int debug;
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 3faa7aa0111a..70ece9e01ce4 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -74,7 +74,7 @@
74#include <linux/spinlock.h> 74#include <linux/spinlock.h>
75#include <asm/uaccess.h> 75#include <asm/uaccess.h>
76#include <linux/usb.h> 76#include <linux/usb.h>
77#include "usb-serial.h" 77#include <linux/usb/serial.h>
78#include "belkin_sa.h" 78#include "belkin_sa.h"
79 79
80static int debug; 80static int debug;
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index f2d993b70c18..6542f220468f 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -13,7 +13,7 @@
13#include <linux/tty.h> 13#include <linux/tty.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/usb.h> 15#include <linux/usb.h>
16#include "usb-serial.h" 16#include <linux/usb/serial.h>
17 17
18static int usb_serial_device_match (struct device *dev, struct device_driver *drv) 18static int usb_serial_device_match (struct device *dev, struct device_driver *drv)
19{ 19{
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 3d456b32c316..3a9073dbfe6a 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -17,11 +17,10 @@
17#include <linux/tty.h> 17#include <linux/tty.h>
18#include <linux/console.h> 18#include <linux/console.h>
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include <linux/usb/serial.h>
20 21
21static int debug; 22static int debug;
22 23
23#include "usb-serial.h"
24
25struct usbcons_info { 24struct usbcons_info {
26 int magic; 25 int magic;
27 int break_flag; 26 int break_flag;
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index df0a4f98b4ae..486c7411b9a7 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -26,7 +26,7 @@
26#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
27#include <linux/usb.h> 27#include <linux/usb.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include "usb-serial.h" 29#include <linux/usb/serial.h>
30 30
31/* 31/*
32 * Version Information 32 * Version Information
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 49b51ab0d4cb..6286aba86fae 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -39,7 +39,7 @@
39#include <linux/spinlock.h> 39#include <linux/spinlock.h>
40#include <asm/uaccess.h> 40#include <asm/uaccess.h>
41#include <linux/usb.h> 41#include <linux/usb.h>
42#include "usb-serial.h" 42#include <linux/usb/serial.h>
43 43
44#define CYBERJACK_LOCAL_BUF_SIZE 32 44#define CYBERJACK_LOCAL_BUF_SIZE 32
45 45
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 4ff2dfb299bd..ee70fddcab60 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -59,11 +59,11 @@
59#include <linux/moduleparam.h> 59#include <linux/moduleparam.h>
60#include <linux/spinlock.h> 60#include <linux/spinlock.h>
61#include <linux/usb.h> 61#include <linux/usb.h>
62#include <linux/usb/serial.h>
62#include <linux/serial.h> 63#include <linux/serial.h>
63#include <linux/delay.h> 64#include <linux/delay.h>
64#include <asm/uaccess.h> 65#include <asm/uaccess.h>
65 66
66#include "usb-serial.h"
67#include "cypress_m8.h" 67#include "cypress_m8.h"
68 68
69 69
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 6953d3ef5738..9b225183fc7a 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -246,7 +246,7 @@
246#include <asm/uaccess.h> 246#include <asm/uaccess.h>
247#include <linux/usb.h> 247#include <linux/usb.h>
248#include <linux/wait.h> 248#include <linux/wait.h>
249#include "usb-serial.h" 249#include <linux/usb/serial.h>
250 250
251/* Defines */ 251/* Defines */
252 252
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 1e2b31eeb497..daafe405d86d 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -62,7 +62,7 @@
62#include <linux/spinlock.h> 62#include <linux/spinlock.h>
63#include <asm/uaccess.h> 63#include <asm/uaccess.h>
64#include <linux/usb.h> 64#include <linux/usb.h>
65#include "usb-serial.h" 65#include <linux/usb/serial.h>
66 66
67static int debug; 67static int debug;
68 68
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c
index debc3b0f9662..5169c2d154ab 100644
--- a/drivers/usb/serial/ezusb.c
+++ b/drivers/usb/serial/ezusb.c
@@ -15,7 +15,7 @@
15#include <linux/tty.h> 15#include <linux/tty.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/usb.h> 17#include <linux/usb.h>
18#include "usb-serial.h" 18#include <linux/usb/serial.h>
19 19
20/* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */ 20/* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */
21#define CPUCS_REG 0x7F92 21#define CPUCS_REG 0x7F92
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 0b9baaf0da90..b458aedc5fb6 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -257,7 +257,7 @@
257#include <asm/uaccess.h> 257#include <asm/uaccess.h>
258#include <linux/usb.h> 258#include <linux/usb.h>
259#include <linux/serial.h> 259#include <linux/serial.h>
260#include "usb-serial.h" 260#include <linux/usb/serial.h>
261#include "ftdi_sio.h" 261#include "ftdi_sio.h"
262 262
263/* 263/*
diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c
index 803721b97e2e..77b977206a8c 100644
--- a/drivers/usb/serial/funsoft.c
+++ b/drivers/usb/serial/funsoft.c
@@ -13,7 +13,7 @@
13#include <linux/tty.h> 13#include <linux/tty.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/usb.h> 15#include <linux/usb.h>
16#include "usb-serial.h" 16#include <linux/usb/serial.h>
17 17
18static struct usb_device_id id_table [] = { 18static struct usb_device_id id_table [] = {
19 { USB_DEVICE(0x1404, 0xcddc) }, 19 { USB_DEVICE(0x1404, 0xcddc) },
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 1f5d1620baa1..727852634be9 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -35,6 +35,7 @@
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <linux/usb.h> 37#include <linux/usb.h>
38#include <linux/usb/serial.h>
38 39
39/* the mode to be set when the port ist opened */ 40/* the mode to be set when the port ist opened */
40static int initial_mode = 1; 41static int initial_mode = 1;
@@ -42,8 +43,6 @@ static int initial_mode = 1;
42/* debug flag */ 43/* debug flag */
43static int debug = 0; 44static int debug = 0;
44 45
45#include "usb-serial.h"
46
47#define GARMIN_VENDOR_ID 0x091E 46#define GARMIN_VENDOR_ID 0x091E
48 47
49/* 48/*
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 99872e13ba2d..172713556393 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -17,8 +17,8 @@
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/moduleparam.h> 18#include <linux/moduleparam.h>
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include <linux/usb/serial.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
21#include "usb-serial.h"
22 22
23static int debug; 23static int debug;
24 24
diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c
index 7e06358b0310..ebcac701b069 100644
--- a/drivers/usb/serial/hp4x.c
+++ b/drivers/usb/serial/hp4x.c
@@ -17,7 +17,7 @@
17#include <linux/tty.h> 17#include <linux/tty.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include "usb-serial.h" 20#include <linux/usb/serial.h>
21 21
22/* 22/*
23 * Version Information 23 * Version Information
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index bd2c05dac2a9..c49976c3ad52 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -44,7 +44,7 @@
44#include <linux/wait.h> 44#include <linux/wait.h>
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <linux/usb.h> 46#include <linux/usb.h>
47#include "usb-serial.h" 47#include <linux/usb/serial.h>
48#include "io_edgeport.h" 48#include "io_edgeport.h"
49#include "io_ionsp.h" /* info for the iosp messages */ 49#include "io_ionsp.h" /* info for the iosp messages */
50#include "io_16654.h" /* 16654 UART defines */ 50#include "io_16654.h" /* 16654 UART defines */
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 723a12ae87b5..17c5b1d2311a 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -39,8 +39,8 @@
39#include <asm/uaccess.h> 39#include <asm/uaccess.h>
40#include <asm/semaphore.h> 40#include <asm/semaphore.h>
41#include <linux/usb.h> 41#include <linux/usb.h>
42#include <linux/usb/serial.h>
42 43
43#include "usb-serial.h"
44#include "io_16654.h" 44#include "io_16654.h"
45#include "io_usbvend.h" 45#include "io_usbvend.h"
46#include "io_ti.h" 46#include "io_ti.h"
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 65beea6e54d1..59c5d999009a 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -55,7 +55,7 @@
55#include <linux/spinlock.h> 55#include <linux/spinlock.h>
56#include <asm/uaccess.h> 56#include <asm/uaccess.h>
57#include <linux/usb.h> 57#include <linux/usb.h>
58#include "usb-serial.h" 58#include <linux/usb/serial.h>
59#include "ipaq.h" 59#include "ipaq.h"
60 60
61#define KP_RETRIES 100 61#define KP_RETRIES 100
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index 4d5275e4dead..87306cb6f9f5 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -46,8 +46,8 @@
46#include <linux/module.h> 46#include <linux/module.h>
47#include <linux/spinlock.h> 47#include <linux/spinlock.h>
48#include <linux/usb.h> 48#include <linux/usb.h>
49#include <linux/usb/serial.h>
49#include <asm/uaccess.h> 50#include <asm/uaccess.h>
50#include "usb-serial.h"
51 51
52/* 52/*
53 * Version Information 53 * Version Information
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 2cf1fed3de43..1738b0b6a376 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -57,7 +57,7 @@
57#include <linux/spinlock.h> 57#include <linux/spinlock.h>
58#include <asm/uaccess.h> 58#include <asm/uaccess.h>
59#include <linux/usb.h> 59#include <linux/usb.h>
60#include "usb-serial.h" 60#include <linux/usb/serial.h>
61 61
62/* 62/*
63 * Version Information 63 * Version Information
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index d7c58f1bc960..015ad6cc1bbb 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -107,7 +107,7 @@
107#include <linux/spinlock.h> 107#include <linux/spinlock.h>
108#include <asm/uaccess.h> 108#include <asm/uaccess.h>
109#include <linux/usb.h> 109#include <linux/usb.h>
110#include "usb-serial.h" 110#include <linux/usb/serial.h>
111#include "keyspan.h" 111#include "keyspan.h"
112 112
113static int debug; 113static int debug;
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 03ab3c0f3cce..49b8dc039d1f 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -78,6 +78,7 @@
78#include <linux/workqueue.h> 78#include <linux/workqueue.h>
79#include <asm/uaccess.h> 79#include <asm/uaccess.h>
80#include <linux/usb.h> 80#include <linux/usb.h>
81#include <linux/usb/serial.h>
81 82
82static int debug; 83static int debug;
83 84
@@ -107,8 +108,6 @@ struct ezusb_hex_record {
107#include "xircom_pgs_fw.h" 108#include "xircom_pgs_fw.h"
108#endif 109#endif
109 110
110#include "usb-serial.h"
111
112/* 111/*
113 * Version Information 112 * Version Information
114 */ 113 */
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index b45ff3e7ab40..2a2f3e2da055 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -55,7 +55,7 @@
55#include <linux/module.h> 55#include <linux/module.h>
56#include <asm/uaccess.h> 56#include <asm/uaccess.h>
57#include <linux/usb.h> 57#include <linux/usb.h>
58#include "usb-serial.h" 58#include <linux/usb/serial.h>
59#include "kl5kusb105.h" 59#include "kl5kusb105.h"
60 60
61static int debug; 61static int debug;
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 457733374772..d50dce034958 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -46,8 +46,8 @@
46#include <linux/spinlock.h> 46#include <linux/spinlock.h>
47#include <asm/uaccess.h> 47#include <asm/uaccess.h>
48#include <linux/usb.h> 48#include <linux/usb.h>
49#include <linux/usb/serial.h>
49#include <linux/ioctl.h> 50#include <linux/ioctl.h>
50#include "usb-serial.h"
51#include "kobil_sct.h" 51#include "kobil_sct.h"
52 52
53static int debug; 53static int debug;
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index ca05d3275f3e..f4d4305c2c02 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -75,7 +75,7 @@
75#include <linux/spinlock.h> 75#include <linux/spinlock.h>
76#include <asm/uaccess.h> 76#include <asm/uaccess.h>
77#include <linux/usb.h> 77#include <linux/usb.h>
78#include "usb-serial.h" 78#include <linux/usb/serial.h>
79#include "mct_u232.h" 79#include "mct_u232.h"
80 80
81/* 81/*
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index 7f544081032e..ac3f8b5d2c49 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -14,7 +14,7 @@
14#include <linux/tty_flip.h> 14#include <linux/tty_flip.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/usb.h> 16#include <linux/usb.h>
17#include "usb-serial.h" 17#include <linux/usb/serial.h>
18 18
19static int debug; 19static int debug;
20 20
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index cfb711a21a45..e49f40913c27 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -46,7 +46,7 @@
46#include <linux/spinlock.h> 46#include <linux/spinlock.h>
47#include <asm/uaccess.h> 47#include <asm/uaccess.h>
48#include <linux/usb.h> 48#include <linux/usb.h>
49#include "usb-serial.h" 49#include <linux/usb/serial.h>
50 50
51static int debug; 51static int debug;
52 52
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 96e641941e50..f0530c1d7b7a 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -65,7 +65,7 @@
65#include <linux/tty_flip.h> 65#include <linux/tty_flip.h>
66#include <linux/module.h> 66#include <linux/module.h>
67#include <linux/usb.h> 67#include <linux/usb.h>
68#include "usb-serial.h" 68#include <linux/usb/serial.h>
69 69
70/* Function prototypes */ 70/* Function prototypes */
71static int option_open(struct usb_serial_port *port, struct file *filp); 71static int option_open(struct usb_serial_port *port, struct file *filp);
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 559330eb3126..259db31b65c1 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -27,7 +27,7 @@
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <linux/usb.h> 29#include <linux/usb.h>
30#include "usb-serial.h" 30#include <linux/usb/serial.h>
31#include "pl2303.h" 31#include "pl2303.h"
32 32
33/* 33/*
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 897d8447252b..789771ecdb11 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -71,7 +71,7 @@
71#include <linux/spinlock.h> 71#include <linux/spinlock.h>
72#include <asm/uaccess.h> 72#include <asm/uaccess.h>
73#include <linux/usb.h> 73#include <linux/usb.h>
74#include "usb-serial.h" 74#include <linux/usb/serial.h>
75 75
76 76
77#ifndef CONFIG_USB_SAFE_PADDED 77#ifndef CONFIG_USB_SAFE_PADDED
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 8da056ae64dd..d29638daa987 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -14,7 +14,7 @@
14#include <linux/tty.h> 14#include <linux/tty.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/usb.h> 16#include <linux/usb.h>
17#include "usb-serial.h" 17#include <linux/usb/serial.h>
18 18
19static struct usb_device_id id_table [] = { 19static struct usb_device_id id_table [] = {
20 { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ 20 { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index a9afff31a921..ac9b8ee52d44 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -83,8 +83,8 @@
83#include <asm/uaccess.h> 83#include <asm/uaccess.h>
84#include <asm/semaphore.h> 84#include <asm/semaphore.h>
85#include <linux/usb.h> 85#include <linux/usb.h>
86#include <linux/usb/serial.h>
86 87
87#include "usb-serial.h"
88#include "ti_usb_3410_5052.h" 88#include "ti_usb_3410_5052.h"
89#include "ti_fw_3410.h" /* firmware image for 3410 */ 89#include "ti_fw_3410.h" /* firmware image for 3410 */
90#include "ti_fw_5052.h" /* firmware image for 5052 */ 90#include "ti_fw_5052.h" /* firmware image for 5052 */
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 5be79cf06fa9..12c1694d322e 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -31,7 +31,7 @@
31#include <linux/smp_lock.h> 31#include <linux/smp_lock.h>
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include <linux/usb.h> 33#include <linux/usb.h>
34#include "usb-serial.h" 34#include <linux/usb/serial.h>
35#include "pl2303.h" 35#include "pl2303.h"
36 36
37/* 37/*
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
deleted file mode 100644
index 0f2802a60194..000000000000
--- a/drivers/usb/serial/usb-serial.h
+++ /dev/null
@@ -1,300 +0,0 @@
1/*
2 * USB Serial Converter driver
3 *
4 * Copyright (C) 1999 - 2005
5 * Greg Kroah-Hartman (greg@kroah.com)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License.
10 *
11 */
12
13
14#ifndef __LINUX_USB_SERIAL_H
15#define __LINUX_USB_SERIAL_H
16
17#include <linux/kref.h>
18#include <linux/mutex.h>
19
20#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */
21#define SERIAL_TTY_MINORS 255 /* loads of devices :) */
22
23#define MAX_NUM_PORTS 8 /* The maximum number of ports one device can grab at once */
24
25/* parity check flag */
26#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
27
28/**
29 * usb_serial_port: structure for the specific ports of a device.
30 * @serial: pointer back to the struct usb_serial owner of this port.
31 * @tty: pointer to the corresponding tty for this port.
32 * @lock: spinlock to grab when updating portions of this structure.
33 * @mutex: mutex used to synchronize serial_open() and serial_close()
34 * access for this port.
35 * @number: the number of the port (the minor number).
36 * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
37 * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
38 * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
39 * for this port.
40 * @interrupt_out_buffer: pointer to the interrupt out buffer for this port.
41 * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes.
42 * @interrupt_out_urb: pointer to the interrupt out struct urb for this port.
43 * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe
44 * for this port.
45 * @bulk_in_buffer: pointer to the bulk in buffer for this port.
46 * @read_urb: pointer to the bulk in struct urb for this port.
47 * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
48 * port.
49 * @bulk_out_buffer: pointer to the bulk out buffer for this port.
50 * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
51 * @write_urb: pointer to the bulk out struct urb for this port.
52 * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
53 * port.
54 * @write_wait: a wait_queue_head_t used by the port.
55 * @work: work queue entry for the line discipline waking up.
56 * @open_count: number of times this port has been opened.
57 *
58 * This structure is used by the usb-serial core and drivers for the specific
59 * ports of a device.
60 */
61struct usb_serial_port {
62 struct usb_serial * serial;
63 struct tty_struct * tty;
64 spinlock_t lock;
65 struct mutex mutex;
66 unsigned char number;
67
68 unsigned char * interrupt_in_buffer;
69 struct urb * interrupt_in_urb;
70 __u8 interrupt_in_endpointAddress;
71
72 unsigned char * interrupt_out_buffer;
73 int interrupt_out_size;
74 struct urb * interrupt_out_urb;
75 __u8 interrupt_out_endpointAddress;
76
77 unsigned char * bulk_in_buffer;
78 int bulk_in_size;
79 struct urb * read_urb;
80 __u8 bulk_in_endpointAddress;
81
82 unsigned char * bulk_out_buffer;
83 int bulk_out_size;
84 struct urb * write_urb;
85 int write_urb_busy;
86 __u8 bulk_out_endpointAddress;
87
88 wait_queue_head_t write_wait;
89 struct work_struct work;
90 int open_count;
91 struct device dev;
92};
93#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
94
95/* get and set the port private data pointer helper functions */
96static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
97{
98 return dev_get_drvdata(&port->dev);
99}
100
101static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
102{
103 dev_set_drvdata(&port->dev, data);
104}
105
106/**
107 * usb_serial - structure used by the usb-serial core for a device
108 * @dev: pointer to the struct usb_device for this device
109 * @type: pointer to the struct usb_serial_driver for this device
110 * @interface: pointer to the struct usb_interface for this device
111 * @minor: the starting minor number for this device
112 * @num_ports: the number of ports this device has
113 * @num_interrupt_in: number of interrupt in endpoints we have
114 * @num_interrupt_out: number of interrupt out endpoints we have
115 * @num_bulk_in: number of bulk in endpoints we have
116 * @num_bulk_out: number of bulk out endpoints we have
117 * @port: array of struct usb_serial_port structures for the different ports.
118 * @private: place to put any driver specific information that is needed. The
119 * usb-serial driver is required to manage this data, the usb-serial core
120 * will not touch this. Use usb_get_serial_data() and
121 * usb_set_serial_data() to access this.
122 */
123struct usb_serial {
124 struct usb_device * dev;
125 struct usb_serial_driver * type;
126 struct usb_interface * interface;
127 unsigned char minor;
128 unsigned char num_ports;
129 unsigned char num_port_pointers;
130 char num_interrupt_in;
131 char num_interrupt_out;
132 char num_bulk_in;
133 char num_bulk_out;
134 struct usb_serial_port * port[MAX_NUM_PORTS];
135 struct kref kref;
136 void * private;
137};
138#define to_usb_serial(d) container_of(d, struct usb_serial, kref)
139
140#define NUM_DONT_CARE (-1)
141
142/* get and set the serial private data pointer helper functions */
143static inline void *usb_get_serial_data (struct usb_serial *serial)
144{
145 return serial->private;
146}
147
148static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
149{
150 serial->private = data;
151}
152
153/**
154 * usb_serial_driver - describes a usb serial driver
155 * @description: pointer to a string that describes this driver. This string used
156 * in the syslog messages when a device is inserted or removed.
157 * @id_table: pointer to a list of usb_device_id structures that define all
158 * of the devices this structure can support.
159 * @num_interrupt_in: the number of interrupt in endpoints this device will
160 * have.
161 * @num_interrupt_out: the number of interrupt out endpoints this device will
162 * have.
163 * @num_bulk_in: the number of bulk in endpoints this device will have.
164 * @num_bulk_out: the number of bulk out endpoints this device will have.
165 * @num_ports: the number of different ports this device will have.
166 * @calc_num_ports: pointer to a function to determine how many ports this
167 * device has dynamically. It will be called after the probe()
168 * callback is called, but before attach()
169 * @probe: pointer to the driver's probe function.
170 * This will be called when the device is inserted into the system,
171 * but before the device has been fully initialized by the usb_serial
172 * subsystem. Use this function to download any firmware to the device,
173 * or any other early initialization that might be needed.
174 * Return 0 to continue on with the initialization sequence. Anything
175 * else will abort it.
176 * @attach: pointer to the driver's attach function.
177 * This will be called when the struct usb_serial structure is fully set
178 * set up. Do any local initialization of the device, or any private
179 * memory structure allocation at this point in time.
180 * @shutdown: pointer to the driver's shutdown function. This will be
181 * called when the device is removed from the system.
182 *
183 * This structure is defines a USB Serial driver. It provides all of
184 * the information that the USB serial core code needs. If the function
185 * pointers are defined, then the USB serial core code will call them when
186 * the corresponding tty port functions are called. If they are not
187 * called, the generic serial function will be used instead.
188 *
189 * The driver.owner field should be set to the module owner of this driver.
190 * The driver.name field should be set to the name of this driver (remember
191 * it will show up in sysfs, so it needs to be short and to the point.
192 * Useing the module name is a good idea.)
193 */
194struct usb_serial_driver {
195 const char *description;
196 const struct usb_device_id *id_table;
197 char num_interrupt_in;
198 char num_interrupt_out;
199 char num_bulk_in;
200 char num_bulk_out;
201 char num_ports;
202
203 struct list_head driver_list;
204 struct device_driver driver;
205
206 int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
207 int (*attach) (struct usb_serial *serial);
208 int (*calc_num_ports) (struct usb_serial *serial);
209
210 void (*shutdown) (struct usb_serial *serial);
211
212 int (*port_probe) (struct usb_serial_port *port);
213 int (*port_remove) (struct usb_serial_port *port);
214
215 /* serial function calls */
216 int (*open) (struct usb_serial_port *port, struct file * filp);
217 void (*close) (struct usb_serial_port *port, struct file * filp);
218 int (*write) (struct usb_serial_port *port, const unsigned char *buf, int count);
219 int (*write_room) (struct usb_serial_port *port);
220 int (*ioctl) (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
221 void (*set_termios) (struct usb_serial_port *port, struct termios * old);
222 void (*break_ctl) (struct usb_serial_port *port, int break_state);
223 int (*chars_in_buffer) (struct usb_serial_port *port);
224 void (*throttle) (struct usb_serial_port *port);
225 void (*unthrottle) (struct usb_serial_port *port);
226 int (*tiocmget) (struct usb_serial_port *port, struct file *file);
227 int (*tiocmset) (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
228
229 void (*read_int_callback)(struct urb *urb, struct pt_regs *regs);
230 void (*write_int_callback)(struct urb *urb, struct pt_regs *regs);
231 void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
232 void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
233};
234#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)
235
236extern int usb_serial_register(struct usb_serial_driver *driver);
237extern void usb_serial_deregister(struct usb_serial_driver *driver);
238extern void usb_serial_port_softint(struct usb_serial_port *port);
239
240extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
241extern void usb_serial_disconnect(struct usb_interface *iface);
242
243extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
244extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
245
246/* USB Serial console functions */
247#ifdef CONFIG_USB_SERIAL_CONSOLE
248extern void usb_serial_console_init (int debug, int minor);
249extern void usb_serial_console_exit (void);
250extern void usb_serial_console_disconnect(struct usb_serial *serial);
251#else
252static inline void usb_serial_console_init (int debug, int minor) { }
253static inline void usb_serial_console_exit (void) { }
254static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
255#endif
256
257/* Functions needed by other parts of the usbserial core */
258extern struct usb_serial *usb_serial_get_by_index (unsigned int minor);
259extern void usb_serial_put(struct usb_serial *serial);
260extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp);
261extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count);
262extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);
263extern int usb_serial_generic_write_room (struct usb_serial_port *port);
264extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
265extern void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *regs);
266extern void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
267extern void usb_serial_generic_shutdown (struct usb_serial *serial);
268extern int usb_serial_generic_register (int debug);
269extern void usb_serial_generic_deregister (void);
270
271extern int usb_serial_bus_register (struct usb_serial_driver *device);
272extern void usb_serial_bus_deregister (struct usb_serial_driver *device);
273
274extern struct usb_serial_driver usb_serial_generic_device;
275extern struct bus_type usb_serial_bus_type;
276extern struct tty_driver *usb_serial_tty_driver;
277
278static inline void usb_serial_debug_data(int debug,
279 struct device *dev,
280 const char *function, int size,
281 const unsigned char *data)
282{
283 int i;
284
285 if (debug) {
286 dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", function, size);
287 for (i = 0; i < size; ++i)
288 printk ("%.2x ", data[i]);
289 printk ("\n");
290 }
291}
292
293/* Use our own dbg macro */
294#undef dbg
295#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
296
297
298
299#endif /* ifdef __LINUX_USB_SERIAL_H */
300
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 32c3c6288985..88949f7884ca 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -25,7 +25,7 @@
25#include <linux/spinlock.h> 25#include <linux/spinlock.h>
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27#include <linux/usb.h> 27#include <linux/usb.h>
28#include "usb-serial.h" 28#include <linux/usb/serial.h>
29#include "visor.h" 29#include "visor.h"
30 30
31/* 31/*
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 540438c3f381..6e6c7934be32 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -79,7 +79,7 @@
79#include <linux/usb.h> 79#include <linux/usb.h>
80#include <linux/serial_reg.h> 80#include <linux/serial_reg.h>
81#include <linux/serial.h> 81#include <linux/serial.h>
82#include "usb-serial.h" 82#include <linux/usb/serial.h>
83#include "whiteheat_fw.h" /* firmware for the ConnectTech WhiteHEAT device */ 83#include "whiteheat_fw.h" /* firmware for the ConnectTech WhiteHEAT device */
84#include "whiteheat.h" /* WhiteHEAT specific commands */ 84#include "whiteheat.h" /* WhiteHEAT specific commands */
85 85