diff options
author | Ming Lei <tom.leiming@gmail.com> | 2008-02-24 05:41:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:55 -0400 |
commit | cdc97792289179974af6dda781c855696358d307 (patch) | |
tree | d633d7e5bd0b14b7581e20790c1a83baadfad80c /drivers/usb/serial | |
parent | a5b6f60c5a30c494017c7a2d11c4067f90d3d0df (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/serial')
27 files changed, 83 insertions, 83 deletions
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 | ||
249 | static void belkin_sa_read_int_callback (struct urb *urb) | 249 | static 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 | ||
301 | static void cyberjack_read_int_callback( struct urb *urb ) | 301 | static 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 | ||
358 | static void cyberjack_read_bulk_callback (struct urb *urb) | 358 | static 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 | ||
410 | static void cyberjack_write_bulk_callback (struct urb *urb) | 410 | static 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 | ||
1210 | static void cypress_read_int_callback(struct urb *urb) | 1210 | static 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 | ||
1362 | static void cypress_write_int_callback(struct urb *urb) | 1362 | static 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 | |||
1227 | static void digi_write_bulk_callback(struct urb *urb) | 1227 | static 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 | ||
1606 | static void digi_read_bulk_callback(struct urb *urb) | 1606 | static 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) | |||
1664 | static int digi_read_inb_callback(struct urb *urb) | 1664 | static 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) | |||
1754 | static int digi_read_oob_callback(struct urb *urb) | 1754 | static 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 | ||
341 | static void empeg_read_bulk_callback (struct urb *urb) | 341 | static 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: | |||
1377 | static void ftdi_write_bulk_callback (struct urb *urb) | 1377 | static 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 | ||
1461 | static void ftdi_read_bulk_callback (struct urb *urb) | 1461 | static 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) | |||
1046 | static void garmin_write_bulk_callback (struct urb *urb) | 1046 | static 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, | |||
1286 | static void garmin_read_bulk_callback (struct urb *urb) | 1286 | static 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 | ||
332 | void usb_serial_generic_read_bulk_callback (struct urb *urb) | 332 | void 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 | ||
360 | void usb_serial_generic_write_bulk_callback (struct urb *urb) | 360 | void 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 | *****************************************************************************/ |
590 | static void edge_interrupt_callback (struct urb *urb) | 590 | static 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 | *****************************************************************************/ |
690 | static void edge_bulk_in_callback (struct urb *urb) | 690 | static 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 | *****************************************************************************/ |
750 | static void edge_bulk_out_data_callback (struct urb *urb) | 750 | static 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 | *****************************************************************************/ |
783 | static void edge_bulk_out_cmd_callback (struct urb *urb) | 783 | static 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 | ||
1711 | static void edge_interrupt_callback (struct urb *urb) | 1711 | static 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 | ||
1804 | static void edge_bulk_in_callback (struct urb *urb) | 1804 | static 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 | ||
1898 | static void edge_bulk_out_callback (struct urb *urb) | 1898 | static 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 | ||
730 | static void ipaq_read_bulk_callback(struct urb *urb) | 730 | static 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 | ||
870 | static void ipaq_write_bulk_callback(struct urb *urb) | 870 | static 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 | ||
394 | static void ir_write_bulk_callback (struct urb *urb) | 394 | static 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 | ||
418 | static void ir_read_bulk_callback (struct urb *urb) | 418 | static 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 | ||
187 | static void iuu_rxcmd(struct urb *urb) | 187 | static 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 | */ |
241 | static void iuu_update_status_callback(struct urb *urb) | 241 | static 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 | ||
271 | static void iuu_status_callback(struct urb *urb) | 271 | static 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 | ||
393 | static void iuu_led_activity_on(struct urb *urb) | 393 | static 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 | ||
414 | static void iuu_led_activity_off(struct urb *urb) | 414 | static 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 | ||
617 | static void read_buf_callback(struct urb *urb) | 617 | static 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 | ||
693 | static void iuu_uart_read_callback(struct urb *urb) | 693 | static 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 | ||
782 | static void read_rxcmd_callback(struct urb *urb) | 782 | static 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 | ||
215 | static void keyspan_pda_rx_interrupt (struct urb *urb) | 215 | static 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 | ||
609 | static void keyspan_pda_write_bulk_callback (struct urb *urb) | 609 | static 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 | ||
568 | static void klsi_105_write_bulk_callback ( struct urb *urb) | 568 | static 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 | ||
629 | static void klsi_105_read_bulk_callback (struct urb *urb) | 629 | static 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 | ||
515 | static void mct_u232_read_int_callback (struct urb *urb) | 515 | static 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 | ||
195 | static void omninet_read_bulk_callback (struct urb *urb) | 195 | static 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) | |||
309 | static void omninet_write_bulk_callback (struct urb *urb) | 309 | static 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 | ||
872 | static void oti6858_read_int_callback(struct urb *urb) | 872 | static 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 | ||
986 | static void oti6858_read_bulk_callback(struct urb *urb) | 986 | static 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 | ||
1039 | static void oti6858_write_bulk_callback(struct urb *urb) | 1039 | static 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 | ||
946 | static void pl2303_read_int_callback(struct urb *urb) | 946 | static 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 | ||
986 | static void pl2303_read_bulk_callback(struct urb *urb) | 986 | static 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 | ||
1069 | static void pl2303_write_bulk_callback(struct urb *urb) | 1069 | static 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 | ||
196 | static void safe_read_bulk_callback (struct urb *urb) | 196 | static 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 | ||
1099 | static void ti_interrupt_callback(struct urb *urb) | 1099 | static 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 | ||
1182 | static void ti_bulk_in_callback(struct urb *urb) | 1182 | static 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 | ||
1248 | static void ti_bulk_out_callback(struct urb *urb) | 1248 | static 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 | ||
479 | static void visor_write_bulk_callback (struct urb *urb) | 479 | static 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 | ||
503 | static void visor_read_bulk_callback (struct urb *urb) | 503 | static 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 | ||
554 | static void visor_read_int_callback (struct urb *urb) | 554 | static 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 | ||
966 | static void command_port_read_callback(struct urb *urb) | 966 | static 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 | ||
1016 | static void whiteheat_read_callback(struct urb *urb) | 1016 | static 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 | ||
1060 | static void whiteheat_write_callback(struct urb *urb) | 1060 | static 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; |