aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2008-02-24 05:41:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commitcdc97792289179974af6dda781c855696358d307 (patch)
treed633d7e5bd0b14b7581e20790c1a83baadfad80c /drivers/usb
parenta5b6f60c5a30c494017c7a2d11c4067f90d3d0df (diff)
USB: remove unnecessary type casting of urb->context
urb->context code cleanup Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/atm/cxacru.c2
-rw-r--r--drivers/usb/class/cdc-acm.c2
-rw-r--r--drivers/usb/misc/auerswald.c12
-rw-r--r--drivers/usb/misc/ftdi-elan.c2
-rw-r--r--drivers/usb/misc/iowarrior.c4
-rw-r--r--drivers/usb/misc/legousbtower.c4
-rw-r--r--drivers/usb/misc/usblcd.c2
-rw-r--r--drivers/usb/misc/usbtest.c4
-rw-r--r--drivers/usb/serial/belkin_sa.c2
-rw-r--r--drivers/usb/serial/cyberjack.c6
-rw-r--r--drivers/usb/serial/cypress_m8.c4
-rw-r--r--drivers/usb/serial/digi_acceleport.c8
-rw-r--r--drivers/usb/serial/empeg.c2
-rw-r--r--drivers/usb/serial/ftdi_sio.c4
-rw-r--r--drivers/usb/serial/garmin_gps.c6
-rw-r--r--drivers/usb/serial/generic.c4
-rw-r--r--drivers/usb/serial/io_edgeport.c8
-rw-r--r--drivers/usb/serial/io_ti.c6
-rw-r--r--drivers/usb/serial/ipaq.c4
-rw-r--r--drivers/usb/serial/ir-usb.c4
-rw-r--r--drivers/usb/serial/iuu_phoenix.c16
-rw-r--r--drivers/usb/serial/keyspan.c28
-rw-r--r--drivers/usb/serial/keyspan_pda.c4
-rw-r--r--drivers/usb/serial/kl5kusb105.c4
-rw-r--r--drivers/usb/serial/mct_u232.c2
-rw-r--r--drivers/usb/serial/mos7840.c8
-rw-r--r--drivers/usb/serial/omninet.c4
-rw-r--r--drivers/usb/serial/option.c6
-rw-r--r--drivers/usb/serial/oti6858.c6
-rw-r--r--drivers/usb/serial/pl2303.c6
-rw-r--r--drivers/usb/serial/safe_serial.c2
-rw-r--r--drivers/usb/serial/sierra.c4
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c6
-rw-r--r--drivers/usb/serial/visor.c6
-rw-r--r--drivers/usb/serial/whiteheat.c6
-rw-r--r--drivers/usb/storage/transport.c2
-rw-r--r--drivers/usb/usb-skeleton.c2
37 files changed, 101 insertions, 101 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index a51eeedc18d4..d470c72b737e 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -444,7 +444,7 @@ CXACRU_ALL_FILES(INIT);
444/* the following three functions are stolen from drivers/usb/core/message.c */ 444/* the following three functions are stolen from drivers/usb/core/message.c */
445static void cxacru_blocking_completion(struct urb *urb) 445static void cxacru_blocking_completion(struct urb *urb)
446{ 446{
447 complete((struct completion *)urb->context); 447 complete(urb->context);
448} 448}
449 449
450static void cxacru_timeout_kill(unsigned long data) 450static void cxacru_timeout_kill(unsigned long data)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 33cdf8fa2f20..7b572e75e73c 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -443,7 +443,7 @@ urbs:
443static void acm_write_bulk(struct urb *urb) 443static void acm_write_bulk(struct urb *urb)
444{ 444{
445 struct acm *acm; 445 struct acm *acm;
446 struct acm_wb *wb = (struct acm_wb *)urb->context; 446 struct acm_wb *wb = urb->context;
447 447
448 dbg("Entering acm_write_bulk with status %d", urb->status); 448 dbg("Entering acm_write_bulk with status %d", urb->status);
449 449
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 309c743a09d5..093938697426 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -284,7 +284,7 @@ static void auerchain_complete (struct urb * urb)
284 int result; 284 int result;
285 285
286 /* get pointer to element and to chain */ 286 /* get pointer to element and to chain */
287 pauerchainelement_t acep = (pauerchainelement_t) urb->context; 287 pauerchainelement_t acep = urb->context;
288 pauerchain_t acp = acep->chain; 288 pauerchain_t acp = acep->chain;
289 289
290 /* restore original entries in urb */ 290 /* restore original entries in urb */
@@ -594,7 +594,7 @@ ac_fail:/* free the elements */
594/* completion handler for synchronous chained URBs */ 594/* completion handler for synchronous chained URBs */
595static void auerchain_blocking_completion (struct urb *urb) 595static void auerchain_blocking_completion (struct urb *urb)
596{ 596{
597 pauerchain_chs_t pchs = (pauerchain_chs_t)urb->context; 597 pauerchain_chs_t pchs = urb->context;
598 pchs->done = 1; 598 pchs->done = 1;
599 wmb(); 599 wmb();
600 wake_up (&pchs->wqh); 600 wake_up (&pchs->wqh);
@@ -847,7 +847,7 @@ static int auerswald_status_retry (int status)
847/* Completion of asynchronous write block */ 847/* Completion of asynchronous write block */
848static void auerchar_ctrlwrite_complete (struct urb * urb) 848static void auerchar_ctrlwrite_complete (struct urb * urb)
849{ 849{
850 pauerbuf_t bp = (pauerbuf_t) urb->context; 850 pauerbuf_t bp = urb->context;
851 pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl))); 851 pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));
852 dbg ("auerchar_ctrlwrite_complete called"); 852 dbg ("auerchar_ctrlwrite_complete called");
853 853
@@ -860,7 +860,7 @@ static void auerchar_ctrlwrite_complete (struct urb * urb)
860/* Completion handler for dummy retry packet */ 860/* Completion handler for dummy retry packet */
861static void auerswald_ctrlread_wretcomplete (struct urb * urb) 861static void auerswald_ctrlread_wretcomplete (struct urb * urb)
862{ 862{
863 pauerbuf_t bp = (pauerbuf_t) urb->context; 863 pauerbuf_t bp = urb->context;
864 pauerswald_t cp; 864 pauerswald_t cp;
865 int ret; 865 int ret;
866 int status = urb->status; 866 int status = urb->status;
@@ -904,7 +904,7 @@ static void auerswald_ctrlread_complete (struct urb * urb)
904 unsigned int serviceid; 904 unsigned int serviceid;
905 pauerswald_t cp; 905 pauerswald_t cp;
906 pauerscon_t scp; 906 pauerscon_t scp;
907 pauerbuf_t bp = (pauerbuf_t) urb->context; 907 pauerbuf_t bp = urb->context;
908 int status = urb->status; 908 int status = urb->status;
909 int ret; 909 int ret;
910 910
@@ -981,7 +981,7 @@ static void auerswald_int_complete (struct urb * urb)
981 int ret; 981 int ret;
982 int status = urb->status; 982 int status = urb->status;
983 pauerbuf_t bp = NULL; 983 pauerbuf_t bp = NULL;
984 pauerswald_t cp = (pauerswald_t) urb->context; 984 pauerswald_t cp = urb->context;
985 985
986 dbg ("%s called", __func__); 986 dbg ("%s called", __func__);
987 987
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index 148b7fe639b2..ec88b3bfee46 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -746,7 +746,7 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer,
746 746
747static void ftdi_elan_write_bulk_callback(struct urb *urb) 747static void ftdi_elan_write_bulk_callback(struct urb *urb)
748{ 748{
749 struct usb_ftdi *ftdi = (struct usb_ftdi *)urb->context; 749 struct usb_ftdi *ftdi = urb->context;
750 int status = urb->status; 750 int status = urb->status;
751 751
752 if (status && !(status == -ENOENT || status == -ECONNRESET || 752 if (status && !(status == -ENOENT || status == -ECONNRESET ||
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 0a2549bc0540..1cb54a28347f 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -154,7 +154,7 @@ MODULE_DEVICE_TABLE(usb, iowarrior_ids);
154 */ 154 */
155static void iowarrior_callback(struct urb *urb) 155static void iowarrior_callback(struct urb *urb)
156{ 156{
157 struct iowarrior *dev = (struct iowarrior *)urb->context; 157 struct iowarrior *dev = urb->context;
158 int intr_idx; 158 int intr_idx;
159 int read_idx; 159 int read_idx;
160 int aux_idx; 160 int aux_idx;
@@ -230,7 +230,7 @@ static void iowarrior_write_callback(struct urb *urb)
230 struct iowarrior *dev; 230 struct iowarrior *dev;
231 int status = urb->status; 231 int status = urb->status;
232 232
233 dev = (struct iowarrior *)urb->context; 233 dev = urb->context;
234 /* sync/async unlink faults aren't errors */ 234 /* sync/async unlink faults aren't errors */
235 if (status && 235 if (status &&
236 !(status == -ENOENT || 236 !(status == -ENOENT ||
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index fae5b1730ba2..9370326a5940 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -753,7 +753,7 @@ exit:
753 */ 753 */
754static void tower_interrupt_in_callback (struct urb *urb) 754static void tower_interrupt_in_callback (struct urb *urb)
755{ 755{
756 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context; 756 struct lego_usb_tower *dev = urb->context;
757 int status = urb->status; 757 int status = urb->status;
758 int retval; 758 int retval;
759 759
@@ -810,7 +810,7 @@ exit:
810 */ 810 */
811static void tower_interrupt_out_callback (struct urb *urb) 811static void tower_interrupt_out_callback (struct urb *urb)
812{ 812{
813 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context; 813 struct lego_usb_tower *dev = urb->context;
814 int status = urb->status; 814 int status = urb->status;
815 815
816 dbg(4, "%s: enter, status %d", __func__, status); 816 dbg(4, "%s: enter, status %d", __func__, status);
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index ada7bf898fe9..7f7021ee4189 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -185,7 +185,7 @@ static void lcd_write_bulk_callback(struct urb *urb)
185 struct usb_lcd *dev; 185 struct usb_lcd *dev;
186 int status = urb->status; 186 int status = urb->status;
187 187
188 dev = (struct usb_lcd *)urb->context; 188 dev = urb->context;
189 189
190 /* sync/async unlink faults aren't errors */ 190 /* sync/async unlink faults aren't errors */
191 if (status && 191 if (status &&
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 678fac86c467..a51983854ca0 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -201,7 +201,7 @@ found:
201 201
202static void simple_callback (struct urb *urb) 202static void simple_callback (struct urb *urb)
203{ 203{
204 complete ((struct completion *) urb->context); 204 complete(urb->context);
205} 205}
206 206
207static struct urb *simple_alloc_urb ( 207static struct urb *simple_alloc_urb (
@@ -1046,7 +1046,7 @@ static void unlink1_callback (struct urb *urb)
1046 status = usb_submit_urb (urb, GFP_ATOMIC); 1046 status = usb_submit_urb (urb, GFP_ATOMIC);
1047 if (status) { 1047 if (status) {
1048 urb->status = status; 1048 urb->status = status;
1049 complete ((struct completion *) urb->context); 1049 complete(urb->context);
1050 } 1050 }
1051} 1051}
1052 1052
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 5a2877c22129..0a322fc53d6e 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -248,7 +248,7 @@ static void belkin_sa_close (struct usb_serial_port *port, struct file *filp)
248 248
249static void belkin_sa_read_int_callback (struct urb *urb) 249static void belkin_sa_read_int_callback (struct urb *urb)
250{ 250{
251 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 251 struct usb_serial_port *port = urb->context;
252 struct belkin_sa_private *priv; 252 struct belkin_sa_private *priv;
253 unsigned char *data = urb->transfer_buffer; 253 unsigned char *data = urb->transfer_buffer;
254 int retval; 254 int retval;
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index d077534ceaeb..c164e2cf2752 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -300,7 +300,7 @@ static int cyberjack_write_room( struct usb_serial_port *port )
300 300
301static void cyberjack_read_int_callback( struct urb *urb ) 301static void cyberjack_read_int_callback( struct urb *urb )
302{ 302{
303 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 303 struct usb_serial_port *port = urb->context;
304 struct cyberjack_private *priv = usb_get_serial_port_data(port); 304 struct cyberjack_private *priv = usb_get_serial_port_data(port);
305 unsigned char *data = urb->transfer_buffer; 305 unsigned char *data = urb->transfer_buffer;
306 int status = urb->status; 306 int status = urb->status;
@@ -357,7 +357,7 @@ resubmit:
357 357
358static void cyberjack_read_bulk_callback (struct urb *urb) 358static void cyberjack_read_bulk_callback (struct urb *urb)
359{ 359{
360 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 360 struct usb_serial_port *port = urb->context;
361 struct cyberjack_private *priv = usb_get_serial_port_data(port); 361 struct cyberjack_private *priv = usb_get_serial_port_data(port);
362 struct tty_struct *tty; 362 struct tty_struct *tty;
363 unsigned char *data = urb->transfer_buffer; 363 unsigned char *data = urb->transfer_buffer;
@@ -409,7 +409,7 @@ static void cyberjack_read_bulk_callback (struct urb *urb)
409 409
410static void cyberjack_write_bulk_callback (struct urb *urb) 410static void cyberjack_write_bulk_callback (struct urb *urb)
411{ 411{
412 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 412 struct usb_serial_port *port = urb->context;
413 struct cyberjack_private *priv = usb_get_serial_port_data(port); 413 struct cyberjack_private *priv = usb_get_serial_port_data(port);
414 int status = urb->status; 414 int status = urb->status;
415 415
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 01dfc0afc654..32121794808d 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1209,7 +1209,7 @@ static void cypress_unthrottle (struct usb_serial_port *port)
1209 1209
1210static void cypress_read_int_callback(struct urb *urb) 1210static void cypress_read_int_callback(struct urb *urb)
1211{ 1211{
1212 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1212 struct usb_serial_port *port = urb->context;
1213 struct cypress_private *priv = usb_get_serial_port_data(port); 1213 struct cypress_private *priv = usb_get_serial_port_data(port);
1214 struct tty_struct *tty; 1214 struct tty_struct *tty;
1215 unsigned char *data = urb->transfer_buffer; 1215 unsigned char *data = urb->transfer_buffer;
@@ -1361,7 +1361,7 @@ continue_read:
1361 1361
1362static void cypress_write_int_callback(struct urb *urb) 1362static void cypress_write_int_callback(struct urb *urb)
1363{ 1363{
1364 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1364 struct usb_serial_port *port = urb->context;
1365 struct cypress_private *priv = usb_get_serial_port_data(port); 1365 struct cypress_private *priv = usb_get_serial_port_data(port);
1366 int result; 1366 int result;
1367 int status = urb->status; 1367 int status = urb->status;
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index c7cbc02f1a70..d17d1645714f 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -1227,7 +1227,7 @@ static int digi_write(struct usb_serial_port *port, const unsigned char *buf, in
1227static void digi_write_bulk_callback(struct urb *urb) 1227static void digi_write_bulk_callback(struct urb *urb)
1228{ 1228{
1229 1229
1230 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1230 struct usb_serial_port *port = urb->context;
1231 struct usb_serial *serial; 1231 struct usb_serial *serial;
1232 struct digi_port *priv; 1232 struct digi_port *priv;
1233 struct digi_serial *serial_priv; 1233 struct digi_serial *serial_priv;
@@ -1605,7 +1605,7 @@ static void digi_shutdown(struct usb_serial *serial)
1605 1605
1606static void digi_read_bulk_callback(struct urb *urb) 1606static void digi_read_bulk_callback(struct urb *urb)
1607{ 1607{
1608 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1608 struct usb_serial_port *port = urb->context;
1609 struct digi_port *priv; 1609 struct digi_port *priv;
1610 struct digi_serial *serial_priv; 1610 struct digi_serial *serial_priv;
1611 int ret; 1611 int ret;
@@ -1664,7 +1664,7 @@ static void digi_read_bulk_callback(struct urb *urb)
1664static int digi_read_inb_callback(struct urb *urb) 1664static int digi_read_inb_callback(struct urb *urb)
1665{ 1665{
1666 1666
1667 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1667 struct usb_serial_port *port = urb->context;
1668 struct tty_struct *tty = port->tty; 1668 struct tty_struct *tty = port->tty;
1669 struct digi_port *priv = usb_get_serial_port_data(port); 1669 struct digi_port *priv = usb_get_serial_port_data(port);
1670 int opcode = ((unsigned char *)urb->transfer_buffer)[0]; 1670 int opcode = ((unsigned char *)urb->transfer_buffer)[0];
@@ -1754,7 +1754,7 @@ static int digi_read_inb_callback(struct urb *urb)
1754static int digi_read_oob_callback(struct urb *urb) 1754static int digi_read_oob_callback(struct urb *urb)
1755{ 1755{
1756 1756
1757 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1757 struct usb_serial_port *port = urb->context;
1758 struct usb_serial *serial = port->serial; 1758 struct usb_serial *serial = port->serial;
1759 struct digi_port *priv = usb_get_serial_port_data(port); 1759 struct digi_port *priv = usb_get_serial_port_data(port);
1760 int opcode, line, status, val; 1760 int opcode, line, status, val;
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 5f731d4912f7..c5ec309a3cb1 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -340,7 +340,7 @@ static void empeg_write_bulk_callback (struct urb *urb)
340 340
341static void empeg_read_bulk_callback (struct urb *urb) 341static void empeg_read_bulk_callback (struct urb *urb)
342{ 342{
343 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 343 struct usb_serial_port *port = urb->context;
344 struct tty_struct *tty; 344 struct tty_struct *tty;
345 unsigned char *data = urb->transfer_buffer; 345 unsigned char *data = urb->transfer_buffer;
346 int result; 346 int result;
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 8b531b377dcb..23f51a41093e 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1377,7 +1377,7 @@ error_no_buffer:
1377static void ftdi_write_bulk_callback (struct urb *urb) 1377static void ftdi_write_bulk_callback (struct urb *urb)
1378{ 1378{
1379 unsigned long flags; 1379 unsigned long flags;
1380 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1380 struct usb_serial_port *port = urb->context;
1381 struct ftdi_private *priv; 1381 struct ftdi_private *priv;
1382 int data_offset; /* will be 1 for the SIO and 0 otherwise */ 1382 int data_offset; /* will be 1 for the SIO and 0 otherwise */
1383 unsigned long countback; 1383 unsigned long countback;
@@ -1460,7 +1460,7 @@ static int ftdi_chars_in_buffer (struct usb_serial_port *port)
1460 1460
1461static void ftdi_read_bulk_callback (struct urb *urb) 1461static void ftdi_read_bulk_callback (struct urb *urb)
1462{ /* ftdi_read_bulk_callback */ 1462{ /* ftdi_read_bulk_callback */
1463 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1463 struct usb_serial_port *port = urb->context;
1464 struct tty_struct *tty; 1464 struct tty_struct *tty;
1465 struct ftdi_private *priv; 1465 struct ftdi_private *priv;
1466 unsigned long countread; 1466 unsigned long countread;
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 513d771adc4e..8ce5a56a48e3 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -1046,7 +1046,7 @@ static void garmin_close (struct usb_serial_port *port, struct file * filp)
1046static void garmin_write_bulk_callback (struct urb *urb) 1046static void garmin_write_bulk_callback (struct urb *urb)
1047{ 1047{
1048 unsigned long flags; 1048 unsigned long flags;
1049 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1049 struct usb_serial_port *port = urb->context;
1050 int status = urb->status; 1050 int status = urb->status;
1051 1051
1052 if (port) { 1052 if (port) {
@@ -1286,7 +1286,7 @@ static void garmin_read_process(struct garmin_data * garmin_data_p,
1286static void garmin_read_bulk_callback (struct urb *urb) 1286static void garmin_read_bulk_callback (struct urb *urb)
1287{ 1287{
1288 unsigned long flags; 1288 unsigned long flags;
1289 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1289 struct usb_serial_port *port = urb->context;
1290 struct usb_serial *serial = port->serial; 1290 struct usb_serial *serial = port->serial;
1291 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1291 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1292 unsigned char *data = urb->transfer_buffer; 1292 unsigned char *data = urb->transfer_buffer;
@@ -1344,7 +1344,7 @@ static void garmin_read_int_callback (struct urb *urb)
1344{ 1344{
1345 unsigned long flags; 1345 unsigned long flags;
1346 int retval; 1346 int retval;
1347 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1347 struct usb_serial_port *port = urb->context;
1348 struct usb_serial *serial = port->serial; 1348 struct usb_serial *serial = port->serial;
1349 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1349 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1350 unsigned char *data = urb->transfer_buffer; 1350 unsigned char *data = urb->transfer_buffer;
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 65765ce76251..537f12a027c2 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -331,7 +331,7 @@ static void flush_and_resubmit_read_urb (struct usb_serial_port *port)
331 331
332void usb_serial_generic_read_bulk_callback (struct urb *urb) 332void usb_serial_generic_read_bulk_callback (struct urb *urb)
333{ 333{
334 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 334 struct usb_serial_port *port = urb->context;
335 unsigned char *data = urb->transfer_buffer; 335 unsigned char *data = urb->transfer_buffer;
336 int status = urb->status; 336 int status = urb->status;
337 unsigned long flags; 337 unsigned long flags;
@@ -359,7 +359,7 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback);
359 359
360void usb_serial_generic_write_bulk_callback (struct urb *urb) 360void usb_serial_generic_write_bulk_callback (struct urb *urb)
361{ 361{
362 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 362 struct usb_serial_port *port = urb->context;
363 int status = urb->status; 363 int status = urb->status;
364 364
365 dbg("%s - port %d", __func__, port->number); 365 dbg("%s - port %d", __func__, port->number);
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 2b676732e9fa..ce2e487f3240 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -589,7 +589,7 @@ static int get_epic_descriptor(struct edgeport_serial *ep)
589 *****************************************************************************/ 589 *****************************************************************************/
590static void edge_interrupt_callback (struct urb *urb) 590static void edge_interrupt_callback (struct urb *urb)
591{ 591{
592 struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; 592 struct edgeport_serial *edge_serial = urb->context;
593 struct edgeport_port *edge_port; 593 struct edgeport_port *edge_port;
594 struct usb_serial_port *port; 594 struct usb_serial_port *port;
595 unsigned char *data = urb->transfer_buffer; 595 unsigned char *data = urb->transfer_buffer;
@@ -689,7 +689,7 @@ exit:
689 *****************************************************************************/ 689 *****************************************************************************/
690static void edge_bulk_in_callback (struct urb *urb) 690static void edge_bulk_in_callback (struct urb *urb)
691{ 691{
692 struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; 692 struct edgeport_serial *edge_serial = urb->context;
693 unsigned char *data = urb->transfer_buffer; 693 unsigned char *data = urb->transfer_buffer;
694 int retval; 694 int retval;
695 __u16 raw_data_length; 695 __u16 raw_data_length;
@@ -749,7 +749,7 @@ static void edge_bulk_in_callback (struct urb *urb)
749 *****************************************************************************/ 749 *****************************************************************************/
750static void edge_bulk_out_data_callback (struct urb *urb) 750static void edge_bulk_out_data_callback (struct urb *urb)
751{ 751{
752 struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; 752 struct edgeport_port *edge_port = urb->context;
753 struct tty_struct *tty; 753 struct tty_struct *tty;
754 int status = urb->status; 754 int status = urb->status;
755 755
@@ -782,7 +782,7 @@ static void edge_bulk_out_data_callback (struct urb *urb)
782 *****************************************************************************/ 782 *****************************************************************************/
783static void edge_bulk_out_cmd_callback (struct urb *urb) 783static void edge_bulk_out_cmd_callback (struct urb *urb)
784{ 784{
785 struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; 785 struct edgeport_port *edge_port = urb->context;
786 struct tty_struct *tty; 786 struct tty_struct *tty;
787 int status = urb->status; 787 int status = urb->status;
788 788
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 0d412ede839a..05e4fa730730 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1710,7 +1710,7 @@ static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8
1710 1710
1711static void edge_interrupt_callback (struct urb *urb) 1711static void edge_interrupt_callback (struct urb *urb)
1712{ 1712{
1713 struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; 1713 struct edgeport_serial *edge_serial = urb->context;
1714 struct usb_serial_port *port; 1714 struct usb_serial_port *port;
1715 struct edgeport_port *edge_port; 1715 struct edgeport_port *edge_port;
1716 unsigned char *data = urb->transfer_buffer; 1716 unsigned char *data = urb->transfer_buffer;
@@ -1803,7 +1803,7 @@ exit:
1803 1803
1804static void edge_bulk_in_callback (struct urb *urb) 1804static void edge_bulk_in_callback (struct urb *urb)
1805{ 1805{
1806 struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; 1806 struct edgeport_port *edge_port = urb->context;
1807 unsigned char *data = urb->transfer_buffer; 1807 unsigned char *data = urb->transfer_buffer;
1808 struct tty_struct *tty; 1808 struct tty_struct *tty;
1809 int retval = 0; 1809 int retval = 0;
@@ -1897,7 +1897,7 @@ static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned c
1897 1897
1898static void edge_bulk_out_callback (struct urb *urb) 1898static void edge_bulk_out_callback (struct urb *urb)
1899{ 1899{
1900 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1900 struct usb_serial_port *port = urb->context;
1901 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 1901 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
1902 int status = urb->status; 1902 int status = urb->status;
1903 1903
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index c90436ea8060..ea924dc48496 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -729,7 +729,7 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp)
729 729
730static void ipaq_read_bulk_callback(struct urb *urb) 730static void ipaq_read_bulk_callback(struct urb *urb)
731{ 731{
732 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 732 struct usb_serial_port *port = urb->context;
733 struct tty_struct *tty; 733 struct tty_struct *tty;
734 unsigned char *data = urb->transfer_buffer; 734 unsigned char *data = urb->transfer_buffer;
735 int result; 735 int result;
@@ -869,7 +869,7 @@ static void ipaq_write_gather(struct usb_serial_port *port)
869 869
870static void ipaq_write_bulk_callback(struct urb *urb) 870static void ipaq_write_bulk_callback(struct urb *urb)
871{ 871{
872 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 872 struct usb_serial_port *port = urb->context;
873 struct ipaq_private *priv = usb_get_serial_port_data(port); 873 struct ipaq_private *priv = usb_get_serial_port_data(port);
874 unsigned long flags; 874 unsigned long flags;
875 int result; 875 int result;
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 496009cff3a8..004d57385a75 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -393,7 +393,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
393 393
394static void ir_write_bulk_callback (struct urb *urb) 394static void ir_write_bulk_callback (struct urb *urb)
395{ 395{
396 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 396 struct usb_serial_port *port = urb->context;
397 int status = urb->status; 397 int status = urb->status;
398 398
399 dbg("%s - port %d", __func__, port->number); 399 dbg("%s - port %d", __func__, port->number);
@@ -417,7 +417,7 @@ static void ir_write_bulk_callback (struct urb *urb)
417 417
418static void ir_read_bulk_callback (struct urb *urb) 418static void ir_read_bulk_callback (struct urb *urb)
419{ 419{
420 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 420 struct usb_serial_port *port = urb->context;
421 struct tty_struct *tty; 421 struct tty_struct *tty;
422 unsigned char *data = urb->transfer_buffer; 422 unsigned char *data = urb->transfer_buffer;
423 int result; 423 int result;
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index b486a54c6f46..8a217648b250 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -186,7 +186,7 @@ static int iuu_tiocmget(struct usb_serial_port *port, struct file *file)
186 186
187static void iuu_rxcmd(struct urb *urb) 187static void iuu_rxcmd(struct urb *urb)
188{ 188{
189 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 189 struct usb_serial_port *port = urb->context;
190 int result; 190 int result;
191 dbg("%s - enter", __func__); 191 dbg("%s - enter", __func__);
192 192
@@ -240,7 +240,7 @@ static int iuu_reset(struct usb_serial_port *port, u8 wt)
240 */ 240 */
241static void iuu_update_status_callback(struct urb *urb) 241static void iuu_update_status_callback(struct urb *urb)
242{ 242{
243 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 243 struct usb_serial_port *port = urb->context;
244 struct iuu_private *priv = usb_get_serial_port_data(port); 244 struct iuu_private *priv = usb_get_serial_port_data(port);
245 u8 *st; 245 u8 *st;
246 dbg("%s - enter", __func__); 246 dbg("%s - enter", __func__);
@@ -270,7 +270,7 @@ static void iuu_update_status_callback(struct urb *urb)
270 270
271static void iuu_status_callback(struct urb *urb) 271static void iuu_status_callback(struct urb *urb)
272{ 272{
273 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 273 struct usb_serial_port *port = urb->context;
274 int result; 274 int result;
275 dbg("%s - enter", __func__); 275 dbg("%s - enter", __func__);
276 276
@@ -392,7 +392,7 @@ static void iuu_rgbf_fill_buffer(u8 *buf, u8 r1, u8 r2, u8 g1, u8 g2, u8 b1,
392 392
393static void iuu_led_activity_on(struct urb *urb) 393static void iuu_led_activity_on(struct urb *urb)
394{ 394{
395 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 395 struct usb_serial_port *port = urb->context;
396 int result; 396 int result;
397 char *buf_ptr = port->write_urb->transfer_buffer; 397 char *buf_ptr = port->write_urb->transfer_buffer;
398 *buf_ptr++ = IUU_SET_LED; 398 *buf_ptr++ = IUU_SET_LED;
@@ -413,7 +413,7 @@ static void iuu_led_activity_on(struct urb *urb)
413 413
414static void iuu_led_activity_off(struct urb *urb) 414static void iuu_led_activity_off(struct urb *urb)
415{ 415{
416 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 416 struct usb_serial_port *port = urb->context;
417 int result; 417 int result;
418 char *buf_ptr = port->write_urb->transfer_buffer; 418 char *buf_ptr = port->write_urb->transfer_buffer;
419 if (xmas == 1) { 419 if (xmas == 1) {
@@ -616,7 +616,7 @@ static int iuu_uart_flush(struct usb_serial_port *port)
616 616
617static void read_buf_callback(struct urb *urb) 617static void read_buf_callback(struct urb *urb)
618{ 618{
619 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 619 struct usb_serial_port *port = urb->context;
620 unsigned char *data = urb->transfer_buffer; 620 unsigned char *data = urb->transfer_buffer;
621 struct tty_struct *tty; 621 struct tty_struct *tty;
622 dbg("%s - urb->status = %d", __func__, urb->status); 622 dbg("%s - urb->status = %d", __func__, urb->status);
@@ -692,7 +692,7 @@ static int iuu_read_buf(struct usb_serial_port *port, int len)
692 692
693static void iuu_uart_read_callback(struct urb *urb) 693static void iuu_uart_read_callback(struct urb *urb)
694{ 694{
695 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 695 struct usb_serial_port *port = urb->context;
696 struct iuu_private *priv = usb_get_serial_port_data(port); 696 struct iuu_private *priv = usb_get_serial_port_data(port);
697 unsigned int flags; 697 unsigned int flags;
698 int status; 698 int status;
@@ -781,7 +781,7 @@ static int iuu_uart_write(struct usb_serial_port *port, const u8 *buf,
781 781
782static void read_rxcmd_callback(struct urb *urb) 782static void read_rxcmd_callback(struct urb *urb)
783{ 783{
784 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 784 struct usb_serial_port *port = urb->context;
785 int result; 785 int result;
786 dbg("%s - enter", __func__); 786 dbg("%s - enter", __func__);
787 787
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 0d122feb2b22..3df8a66c5c3c 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -445,7 +445,7 @@ static void usa26_indat_callback(struct urb *urb)
445 return; 445 return;
446 } 446 }
447 447
448 port = (struct usb_serial_port *) urb->context; 448 port = urb->context;
449 tty = port->tty; 449 tty = port->tty;
450 if (tty && urb->actual_length) { 450 if (tty && urb->actual_length) {
451 /* 0x80 bit is error flag */ 451 /* 0x80 bit is error flag */
@@ -490,7 +490,7 @@ static void usa2x_outdat_callback(struct urb *urb)
490 struct usb_serial_port *port; 490 struct usb_serial_port *port;
491 struct keyspan_port_private *p_priv; 491 struct keyspan_port_private *p_priv;
492 492
493 port = (struct usb_serial_port *) urb->context; 493 port = urb->context;
494 p_priv = usb_get_serial_port_data(port); 494 p_priv = usb_get_serial_port_data(port);
495 dbg ("%s - urb %d", __func__, urb == p_priv->out_urbs[1]); 495 dbg ("%s - urb %d", __func__, urb == p_priv->out_urbs[1]);
496 496
@@ -509,7 +509,7 @@ static void usa26_outcont_callback(struct urb *urb)
509 struct usb_serial_port *port; 509 struct usb_serial_port *port;
510 struct keyspan_port_private *p_priv; 510 struct keyspan_port_private *p_priv;
511 511
512 port = (struct usb_serial_port *) urb->context; 512 port = urb->context;
513 p_priv = usb_get_serial_port_data(port); 513 p_priv = usb_get_serial_port_data(port);
514 514
515 if (p_priv->resend_cont) { 515 if (p_priv->resend_cont) {
@@ -528,7 +528,7 @@ static void usa26_instat_callback(struct urb *urb)
528 int old_dcd_state, err; 528 int old_dcd_state, err;
529 int status = urb->status; 529 int status = urb->status;
530 530
531 serial = (struct usb_serial *) urb->context; 531 serial = urb->context;
532 532
533 if (status) { 533 if (status) {
534 dbg("%s - nonzero status: %x", __func__, status); 534 dbg("%s - nonzero status: %x", __func__, status);
@@ -599,7 +599,7 @@ static void usa28_indat_callback(struct urb *urb)
599 599
600 dbg ("%s", __func__); 600 dbg ("%s", __func__);
601 601
602 port = (struct usb_serial_port *) urb->context; 602 port = urb->context;
603 p_priv = usb_get_serial_port_data(port); 603 p_priv = usb_get_serial_port_data(port);
604 data = urb->transfer_buffer; 604 data = urb->transfer_buffer;
605 605
@@ -613,7 +613,7 @@ static void usa28_indat_callback(struct urb *urb)
613 return; 613 return;
614 } 614 }
615 615
616 port = (struct usb_serial_port *) urb->context; 616 port = urb->context;
617 p_priv = usb_get_serial_port_data(port); 617 p_priv = usb_get_serial_port_data(port);
618 data = urb->transfer_buffer; 618 data = urb->transfer_buffer;
619 619
@@ -647,7 +647,7 @@ static void usa28_outcont_callback(struct urb *urb)
647 struct usb_serial_port *port; 647 struct usb_serial_port *port;
648 struct keyspan_port_private *p_priv; 648 struct keyspan_port_private *p_priv;
649 649
650 port = (struct usb_serial_port *) urb->context; 650 port = urb->context;
651 p_priv = usb_get_serial_port_data(port); 651 p_priv = usb_get_serial_port_data(port);
652 652
653 if (p_priv->resend_cont) { 653 if (p_priv->resend_cont) {
@@ -667,7 +667,7 @@ static void usa28_instat_callback(struct urb *urb)
667 int old_dcd_state; 667 int old_dcd_state;
668 int status = urb->status; 668 int status = urb->status;
669 669
670 serial = (struct usb_serial *) urb->context; 670 serial = urb->context;
671 671
672 if (status) { 672 if (status) {
673 dbg("%s - nonzero status: %x", __func__, status); 673 dbg("%s - nonzero status: %x", __func__, status);
@@ -733,7 +733,7 @@ static void usa49_glocont_callback(struct urb *urb)
733 733
734 dbg ("%s", __func__); 734 dbg ("%s", __func__);
735 735
736 serial = (struct usb_serial *) urb->context; 736 serial = urb->context;
737 for (i = 0; i < serial->num_ports; ++i) { 737 for (i = 0; i < serial->num_ports; ++i) {
738 port = serial->port[i]; 738 port = serial->port[i];
739 p_priv = usb_get_serial_port_data(port); 739 p_priv = usb_get_serial_port_data(port);
@@ -761,7 +761,7 @@ static void usa49_instat_callback(struct urb *urb)
761 761
762 dbg ("%s", __func__); 762 dbg ("%s", __func__);
763 763
764 serial = (struct usb_serial *) urb->context; 764 serial = urb->context;
765 765
766 if (status) { 766 if (status) {
767 dbg("%s - nonzero status: %x", __func__, status); 767 dbg("%s - nonzero status: %x", __func__, status);
@@ -836,7 +836,7 @@ static void usa49_indat_callback(struct urb *urb)
836 return; 836 return;
837 } 837 }
838 838
839 port = (struct usb_serial_port *) urb->context; 839 port = urb->context;
840 tty = port->tty; 840 tty = port->tty;
841 if (tty && urb->actual_length) { 841 if (tty && urb->actual_length) {
842 /* 0x80 bit is error flag */ 842 /* 0x80 bit is error flag */
@@ -973,7 +973,7 @@ static void usa90_indat_callback(struct urb *urb)
973 return; 973 return;
974 } 974 }
975 975
976 port = (struct usb_serial_port *) urb->context; 976 port = urb->context;
977 p_priv = usb_get_serial_port_data(port); 977 p_priv = usb_get_serial_port_data(port);
978 978
979 tty = port->tty; 979 tty = port->tty;
@@ -1037,7 +1037,7 @@ static void usa90_instat_callback(struct urb *urb)
1037 int old_dcd_state, err; 1037 int old_dcd_state, err;
1038 int status = urb->status; 1038 int status = urb->status;
1039 1039
1040 serial = (struct usb_serial *) urb->context; 1040 serial = urb->context;
1041 1041
1042 if (status) { 1042 if (status) {
1043 dbg("%s - nonzero status: %x", __func__, status); 1043 dbg("%s - nonzero status: %x", __func__, status);
@@ -1084,7 +1084,7 @@ static void usa90_outcont_callback(struct urb *urb)
1084 struct usb_serial_port *port; 1084 struct usb_serial_port *port;
1085 struct keyspan_port_private *p_priv; 1085 struct keyspan_port_private *p_priv;
1086 1086
1087 port = (struct usb_serial_port *) urb->context; 1087 port = urb->context;
1088 p_priv = usb_get_serial_port_data(port); 1088 p_priv = usb_get_serial_port_data(port);
1089 1089
1090 if (p_priv->resend_cont) { 1090 if (p_priv->resend_cont) {
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index b650fb4754b4..ff54203944ca 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -214,7 +214,7 @@ static void keyspan_pda_request_unthrottle(struct work_struct *work)
214 214
215static void keyspan_pda_rx_interrupt (struct urb *urb) 215static void keyspan_pda_rx_interrupt (struct urb *urb)
216{ 216{
217 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 217 struct usb_serial_port *port = urb->context;
218 struct tty_struct *tty = port->tty; 218 struct tty_struct *tty = port->tty;
219 unsigned char *data = urb->transfer_buffer; 219 unsigned char *data = urb->transfer_buffer;
220 int i; 220 int i;
@@ -608,7 +608,7 @@ exit:
608 608
609static void keyspan_pda_write_bulk_callback (struct urb *urb) 609static void keyspan_pda_write_bulk_callback (struct urb *urb)
610{ 610{
611 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 611 struct usb_serial_port *port = urb->context;
612 struct keyspan_pda_private *priv; 612 struct keyspan_pda_private *priv;
613 613
614 port->write_urb_busy = 0; 614 port->write_urb_busy = 0;
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index b3ac045ab408..b395ac759888 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -567,7 +567,7 @@ exit:
567 567
568static void klsi_105_write_bulk_callback ( struct urb *urb) 568static void klsi_105_write_bulk_callback ( struct urb *urb)
569{ 569{
570 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 570 struct usb_serial_port *port = urb->context;
571 int status = urb->status; 571 int status = urb->status;
572 572
573 dbg("%s - port %d", __func__, port->number); 573 dbg("%s - port %d", __func__, port->number);
@@ -628,7 +628,7 @@ static int klsi_105_write_room (struct usb_serial_port *port)
628 628
629static void klsi_105_read_bulk_callback (struct urb *urb) 629static void klsi_105_read_bulk_callback (struct urb *urb)
630{ 630{
631 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 631 struct usb_serial_port *port = urb->context;
632 struct klsi_105_private *priv = usb_get_serial_port_data(port); 632 struct klsi_105_private *priv = usb_get_serial_port_data(port);
633 struct tty_struct *tty; 633 struct tty_struct *tty;
634 unsigned char *data = urb->transfer_buffer; 634 unsigned char *data = urb->transfer_buffer;
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index e25c0c2791eb..5fc2cef30e39 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -514,7 +514,7 @@ static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
514 514
515static void mct_u232_read_int_callback (struct urb *urb) 515static void mct_u232_read_int_callback (struct urb *urb)
516{ 516{
517 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 517 struct usb_serial_port *port = urb->context;
518 struct mct_u232_private *priv = usb_get_serial_port_data(port); 518 struct mct_u232_private *priv = usb_get_serial_port_data(port);
519 struct usb_serial *serial = port->serial; 519 struct usb_serial *serial = port->serial;
520 struct tty_struct *tty; 520 struct tty_struct *tty;
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 7823222570b6..6bcb82d3911a 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -449,7 +449,7 @@ static void mos7840_control_callback(struct urb *urb)
449 int result = 0; 449 int result = 0;
450 int status = urb->status; 450 int status = urb->status;
451 451
452 mos7840_port = (struct moschip_port *)urb->context; 452 mos7840_port = urb->context;
453 453
454 switch (status) { 454 switch (status) {
455 case 0: 455 case 0:
@@ -554,7 +554,7 @@ static void mos7840_interrupt_callback(struct urb *urb)
554 length = urb->actual_length; 554 length = urb->actual_length;
555 data = urb->transfer_buffer; 555 data = urb->transfer_buffer;
556 556
557 serial = (struct usb_serial *)urb->context; 557 serial = urb->context;
558 558
559 /* Moschip get 5 bytes 559 /* Moschip get 5 bytes
560 * Byte 1 IIR Port 1 (port.number is 0) 560 * Byte 1 IIR Port 1 (port.number is 0)
@@ -685,7 +685,7 @@ static void mos7840_bulk_in_callback(struct urb *urb)
685 return; 685 return;
686 } 686 }
687 687
688 mos7840_port = (struct moschip_port *)urb->context; 688 mos7840_port = urb->context;
689 if (!mos7840_port) { 689 if (!mos7840_port) {
690 dbg("%s", "NULL mos7840_port pointer \n"); 690 dbg("%s", "NULL mos7840_port pointer \n");
691 return; 691 return;
@@ -752,7 +752,7 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
752 int status = urb->status; 752 int status = urb->status;
753 int i; 753 int i;
754 754
755 mos7840_port = (struct moschip_port *)urb->context; 755 mos7840_port = urb->context;
756 spin_lock(&mos7840_port->pool_lock); 756 spin_lock(&mos7840_port->pool_lock);
757 for (i = 0; i < NUM_URBS; i++) { 757 for (i = 0; i < NUM_URBS; i++) {
758 if (urb == mos7840_port->write_urb_pool[i]) { 758 if (urb == mos7840_port->write_urb_pool[i]) {
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 10090cb52d31..7b7422f49478 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -194,7 +194,7 @@ static void omninet_close (struct usb_serial_port *port, struct file * filp)
194 194
195static void omninet_read_bulk_callback (struct urb *urb) 195static void omninet_read_bulk_callback (struct urb *urb)
196{ 196{
197 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 197 struct usb_serial_port *port = urb->context;
198 unsigned char *data = urb->transfer_buffer; 198 unsigned char *data = urb->transfer_buffer;
199 struct omninet_header *header = (struct omninet_header *) &data[0]; 199 struct omninet_header *header = (struct omninet_header *) &data[0];
200 int status = urb->status; 200 int status = urb->status;
@@ -309,7 +309,7 @@ static int omninet_write_room (struct usb_serial_port *port)
309static void omninet_write_bulk_callback (struct urb *urb) 309static void omninet_write_bulk_callback (struct urb *urb)
310{ 310{
311/* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */ 311/* struct omninet_header *header = (struct omninet_header *) urb->transfer_buffer; */
312 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 312 struct usb_serial_port *port = urb->context;
313 int status = urb->status; 313 int status = urb->status;
314 314
315 dbg("%s - port %0x\n", __func__, port->number); 315 dbg("%s - port %0x\n", __func__, port->number);
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a83892627d66..e4be2d442b1e 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -545,7 +545,7 @@ static void option_indat_callback(struct urb *urb)
545 dbg("%s: %p", __func__, urb); 545 dbg("%s: %p", __func__, urb);
546 546
547 endpoint = usb_pipeendpoint(urb->pipe); 547 endpoint = usb_pipeendpoint(urb->pipe);
548 port = (struct usb_serial_port *) urb->context; 548 port = urb->context;
549 549
550 if (status) { 550 if (status) {
551 dbg("%s: nonzero status: %d on endpoint %02x.", 551 dbg("%s: nonzero status: %d on endpoint %02x.",
@@ -579,7 +579,7 @@ static void option_outdat_callback(struct urb *urb)
579 579
580 dbg("%s", __func__); 580 dbg("%s", __func__);
581 581
582 port = (struct usb_serial_port *) urb->context; 582 port = urb->context;
583 583
584 usb_serial_port_softint(port); 584 usb_serial_port_softint(port);
585 585
@@ -597,7 +597,7 @@ static void option_instat_callback(struct urb *urb)
597{ 597{
598 int err; 598 int err;
599 int status = urb->status; 599 int status = urb->status;
600 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 600 struct usb_serial_port *port = urb->context;
601 struct option_port_private *portdata = usb_get_serial_port_data(port); 601 struct option_port_private *portdata = usb_get_serial_port_data(port);
602 struct usb_serial *serial = port->serial; 602 struct usb_serial *serial = port->serial;
603 603
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 87f33e06301c..d92bb6501c84 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -871,7 +871,7 @@ static void oti6858_shutdown(struct usb_serial *serial)
871 871
872static void oti6858_read_int_callback(struct urb *urb) 872static void oti6858_read_int_callback(struct urb *urb)
873{ 873{
874 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 874 struct usb_serial_port *port = urb->context;
875 struct oti6858_private *priv = usb_get_serial_port_data(port); 875 struct oti6858_private *priv = usb_get_serial_port_data(port);
876 int transient = 0, can_recv = 0, resubmit = 1; 876 int transient = 0, can_recv = 0, resubmit = 1;
877 int status = urb->status; 877 int status = urb->status;
@@ -985,7 +985,7 @@ static void oti6858_read_int_callback(struct urb *urb)
985 985
986static void oti6858_read_bulk_callback(struct urb *urb) 986static void oti6858_read_bulk_callback(struct urb *urb)
987{ 987{
988 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 988 struct usb_serial_port *port = urb->context;
989 struct oti6858_private *priv = usb_get_serial_port_data(port); 989 struct oti6858_private *priv = usb_get_serial_port_data(port);
990 struct tty_struct *tty; 990 struct tty_struct *tty;
991 unsigned char *data = urb->transfer_buffer; 991 unsigned char *data = urb->transfer_buffer;
@@ -1038,7 +1038,7 @@ static void oti6858_read_bulk_callback(struct urb *urb)
1038 1038
1039static void oti6858_write_bulk_callback(struct urb *urb) 1039static void oti6858_write_bulk_callback(struct urb *urb)
1040{ 1040{
1041 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 1041 struct usb_serial_port *port = urb->context;
1042 struct oti6858_private *priv = usb_get_serial_port_data(port); 1042 struct oti6858_private *priv = usb_get_serial_port_data(port);
1043 int status = urb->status; 1043 int status = urb->status;
1044 int result; 1044 int result;
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index c60930ec9341..c605fb68f807 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -945,7 +945,7 @@ static void pl2303_update_line_status(struct usb_serial_port *port,
945 945
946static void pl2303_read_int_callback(struct urb *urb) 946static void pl2303_read_int_callback(struct urb *urb)
947{ 947{
948 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 948 struct usb_serial_port *port = urb->context;
949 unsigned char *data = urb->transfer_buffer; 949 unsigned char *data = urb->transfer_buffer;
950 unsigned int actual_length = urb->actual_length; 950 unsigned int actual_length = urb->actual_length;
951 int status = urb->status; 951 int status = urb->status;
@@ -985,7 +985,7 @@ exit:
985 985
986static void pl2303_read_bulk_callback(struct urb *urb) 986static void pl2303_read_bulk_callback(struct urb *urb)
987{ 987{
988 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 988 struct usb_serial_port *port = urb->context;
989 struct pl2303_private *priv = usb_get_serial_port_data(port); 989 struct pl2303_private *priv = usb_get_serial_port_data(port);
990 struct tty_struct *tty; 990 struct tty_struct *tty;
991 unsigned char *data = urb->transfer_buffer; 991 unsigned char *data = urb->transfer_buffer;
@@ -1068,7 +1068,7 @@ static void pl2303_read_bulk_callback(struct urb *urb)
1068 1068
1069static void pl2303_write_bulk_callback(struct urb *urb) 1069static void pl2303_write_bulk_callback(struct urb *urb)
1070{ 1070{
1071 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 1071 struct usb_serial_port *port = urb->context;
1072 struct pl2303_private *priv = usb_get_serial_port_data(port); 1072 struct pl2303_private *priv = usb_get_serial_port_data(port);
1073 int result; 1073 int result;
1074 int status = urb->status; 1074 int status = urb->status;
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index e6acac49a9c8..94bddf06ea4f 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -195,7 +195,7 @@ static __u16 __inline__ fcs_compute10 (unsigned char *sp, int len, __u16 fcs)
195 195
196static void safe_read_bulk_callback (struct urb *urb) 196static void safe_read_bulk_callback (struct urb *urb)
197{ 197{
198 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 198 struct usb_serial_port *port = urb->context;
199 unsigned char *data = urb->transfer_buffer; 199 unsigned char *data = urb->transfer_buffer;
200 unsigned char length = urb->actual_length; 200 unsigned char length = urb->actual_length;
201 int result; 201 int result;
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 23188873eb07..29074c1ba22b 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -457,7 +457,7 @@ static void sierra_indat_callback(struct urb *urb)
457 dbg("%s: %p", __func__, urb); 457 dbg("%s: %p", __func__, urb);
458 458
459 endpoint = usb_pipeendpoint(urb->pipe); 459 endpoint = usb_pipeendpoint(urb->pipe);
460 port = (struct usb_serial_port *) urb->context; 460 port = urb->context;
461 461
462 if (status) { 462 if (status) {
463 dbg("%s: nonzero status: %d on endpoint %02x.", 463 dbg("%s: nonzero status: %d on endpoint %02x.",
@@ -487,7 +487,7 @@ static void sierra_instat_callback(struct urb *urb)
487{ 487{
488 int err; 488 int err;
489 int status = urb->status; 489 int status = urb->status;
490 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 490 struct usb_serial_port *port = urb->context;
491 struct sierra_port_private *portdata = usb_get_serial_port_data(port); 491 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
492 struct usb_serial *serial = port->serial; 492 struct usb_serial *serial = port->serial;
493 493
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index e0b1564de900..a1c8aef01417 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -1098,7 +1098,7 @@ static void ti_break(struct usb_serial_port *port, int break_state)
1098 1098
1099static void ti_interrupt_callback(struct urb *urb) 1099static void ti_interrupt_callback(struct urb *urb)
1100{ 1100{
1101 struct ti_device *tdev = (struct ti_device *)urb->context; 1101 struct ti_device *tdev = urb->context;
1102 struct usb_serial_port *port; 1102 struct usb_serial_port *port;
1103 struct usb_serial *serial = tdev->td_serial; 1103 struct usb_serial *serial = tdev->td_serial;
1104 struct ti_port *tport; 1104 struct ti_port *tport;
@@ -1181,7 +1181,7 @@ exit:
1181 1181
1182static void ti_bulk_in_callback(struct urb *urb) 1182static void ti_bulk_in_callback(struct urb *urb)
1183{ 1183{
1184 struct ti_port *tport = (struct ti_port *)urb->context; 1184 struct ti_port *tport = urb->context;
1185 struct usb_serial_port *port = tport->tp_port; 1185 struct usb_serial_port *port = tport->tp_port;
1186 struct device *dev = &urb->dev->dev; 1186 struct device *dev = &urb->dev->dev;
1187 int status = urb->status; 1187 int status = urb->status;
@@ -1247,7 +1247,7 @@ exit:
1247 1247
1248static void ti_bulk_out_callback(struct urb *urb) 1248static void ti_bulk_out_callback(struct urb *urb)
1249{ 1249{
1250 struct ti_port *tport = (struct ti_port *)urb->context; 1250 struct ti_port *tport = urb->context;
1251 struct usb_serial_port *port = tport->tp_port; 1251 struct usb_serial_port *port = tport->tp_port;
1252 struct device *dev = &urb->dev->dev; 1252 struct device *dev = &urb->dev->dev;
1253 int status = urb->status; 1253 int status = urb->status;
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index a100a52a376e..5fc20122145f 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -478,7 +478,7 @@ static int visor_chars_in_buffer (struct usb_serial_port *port)
478 478
479static void visor_write_bulk_callback (struct urb *urb) 479static void visor_write_bulk_callback (struct urb *urb)
480{ 480{
481 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 481 struct usb_serial_port *port = urb->context;
482 struct visor_private *priv = usb_get_serial_port_data(port); 482 struct visor_private *priv = usb_get_serial_port_data(port);
483 int status = urb->status; 483 int status = urb->status;
484 unsigned long flags; 484 unsigned long flags;
@@ -502,7 +502,7 @@ static void visor_write_bulk_callback (struct urb *urb)
502 502
503static void visor_read_bulk_callback (struct urb *urb) 503static void visor_read_bulk_callback (struct urb *urb)
504{ 504{
505 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 505 struct usb_serial_port *port = urb->context;
506 struct visor_private *priv = usb_get_serial_port_data(port); 506 struct visor_private *priv = usb_get_serial_port_data(port);
507 unsigned char *data = urb->transfer_buffer; 507 unsigned char *data = urb->transfer_buffer;
508 int status = urb->status; 508 int status = urb->status;
@@ -553,7 +553,7 @@ static void visor_read_bulk_callback (struct urb *urb)
553 553
554static void visor_read_int_callback (struct urb *urb) 554static void visor_read_int_callback (struct urb *urb)
555{ 555{
556 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 556 struct usb_serial_port *port = urb->context;
557 int status = urb->status; 557 int status = urb->status;
558 int result; 558 int result;
559 559
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 6926a81a0ccd..e96bf8663ffc 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -965,7 +965,7 @@ static void command_port_write_callback(struct urb *urb)
965 965
966static void command_port_read_callback(struct urb *urb) 966static void command_port_read_callback(struct urb *urb)
967{ 967{
968 struct usb_serial_port *command_port = (struct usb_serial_port *)urb->context; 968 struct usb_serial_port *command_port = urb->context;
969 struct whiteheat_command_private *command_info; 969 struct whiteheat_command_private *command_info;
970 int status = urb->status; 970 int status = urb->status;
971 unsigned char *data = urb->transfer_buffer; 971 unsigned char *data = urb->transfer_buffer;
@@ -1015,7 +1015,7 @@ static void command_port_read_callback(struct urb *urb)
1015 1015
1016static void whiteheat_read_callback(struct urb *urb) 1016static void whiteheat_read_callback(struct urb *urb)
1017{ 1017{
1018 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1018 struct usb_serial_port *port = urb->context;
1019 struct whiteheat_urb_wrap *wrap; 1019 struct whiteheat_urb_wrap *wrap;
1020 unsigned char *data = urb->transfer_buffer; 1020 unsigned char *data = urb->transfer_buffer;
1021 struct whiteheat_private *info = usb_get_serial_port_data(port); 1021 struct whiteheat_private *info = usb_get_serial_port_data(port);
@@ -1059,7 +1059,7 @@ static void whiteheat_read_callback(struct urb *urb)
1059 1059
1060static void whiteheat_write_callback(struct urb *urb) 1060static void whiteheat_write_callback(struct urb *urb)
1061{ 1061{
1062 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1062 struct usb_serial_port *port = urb->context;
1063 struct whiteheat_private *info = usb_get_serial_port_data(port); 1063 struct whiteheat_private *info = usb_get_serial_port_data(port);
1064 struct whiteheat_urb_wrap *wrap; 1064 struct whiteheat_urb_wrap *wrap;
1065 int status = urb->status; 1065 int status = urb->status;
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index db55ec39bb83..6610d2dd1e7f 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -110,7 +110,7 @@
110 */ 110 */
111static void usb_stor_blocking_completion(struct urb *urb) 111static void usb_stor_blocking_completion(struct urb *urb)
112{ 112{
113 struct completion *urb_done_ptr = (struct completion *)urb->context; 113 struct completion *urb_done_ptr = urb->context;
114 114
115 complete(urb_done_ptr); 115 complete(urb_done_ptr);
116} 116}
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 73e6a66d95a7..be76084c8d7e 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -212,7 +212,7 @@ static void skel_write_bulk_callback(struct urb *urb)
212{ 212{
213 struct usb_skel *dev; 213 struct usb_skel *dev;
214 214
215 dev = (struct usb_skel *)urb->context; 215 dev = urb->context;
216 216
217 /* sync/async unlink faults aren't errors */ 217 /* sync/async unlink faults aren't errors */
218 if (urb->status) { 218 if (urb->status) {