Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ming Lei and committed by
Greg Kroah-Hartman
cdc97792 a5b6f60c

+101 -101
+1 -1
drivers/usb/atm/cxacru.c
··· 444 444 /* the following three functions are stolen from drivers/usb/core/message.c */ 445 445 static void cxacru_blocking_completion(struct urb *urb) 446 446 { 447 - complete((struct completion *)urb->context); 447 + complete(urb->context); 448 448 } 449 449 450 450 static void cxacru_timeout_kill(unsigned long data)
+1 -1
drivers/usb/class/cdc-acm.c
··· 443 443 static void acm_write_bulk(struct urb *urb) 444 444 { 445 445 struct acm *acm; 446 - struct acm_wb *wb = (struct acm_wb *)urb->context; 446 + struct acm_wb *wb = urb->context; 447 447 448 448 dbg("Entering acm_write_bulk with status %d", urb->status); 449 449
+6 -6
drivers/usb/misc/auerswald.c
··· 284 284 int result; 285 285 286 286 /* get pointer to element and to chain */ 287 - pauerchainelement_t acep = (pauerchainelement_t) urb->context; 287 + pauerchainelement_t acep = urb->context; 288 288 pauerchain_t acp = acep->chain; 289 289 290 290 /* restore original entries in urb */ ··· 594 594 /* completion handler for synchronous chained URBs */ 595 595 static 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 598 pchs->done = 1; 599 599 wmb(); 600 600 wake_up (&pchs->wqh); ··· 847 847 /* Completion of asynchronous write block */ 848 848 static void auerchar_ctrlwrite_complete (struct urb * urb) 849 849 { 850 - pauerbuf_t bp = (pauerbuf_t) urb->context; 850 + pauerbuf_t bp = urb->context; 851 851 pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl))); 852 852 dbg ("auerchar_ctrlwrite_complete called"); 853 853 ··· 860 860 /* Completion handler for dummy retry packet */ 861 861 static void auerswald_ctrlread_wretcomplete (struct urb * urb) 862 862 { 863 - pauerbuf_t bp = (pauerbuf_t) urb->context; 863 + pauerbuf_t bp = urb->context; 864 864 pauerswald_t cp; 865 865 int ret; 866 866 int status = urb->status; ··· 904 904 unsigned int serviceid; 905 905 pauerswald_t cp; 906 906 pauerscon_t scp; 907 - pauerbuf_t bp = (pauerbuf_t) urb->context; 907 + pauerbuf_t bp = urb->context; 908 908 int status = urb->status; 909 909 int ret; 910 910 ··· 981 981 int ret; 982 982 int status = urb->status; 983 983 pauerbuf_t bp = NULL; 984 - pauerswald_t cp = (pauerswald_t) urb->context; 984 + pauerswald_t cp = urb->context; 985 985 986 986 dbg ("%s called", __func__); 987 987
+1 -1
drivers/usb/misc/ftdi-elan.c
··· 746 746 747 747 static 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 750 int status = urb->status; 751 751 752 752 if (status && !(status == -ENOENT || status == -ECONNRESET ||
+2 -2
drivers/usb/misc/iowarrior.c
··· 154 154 */ 155 155 static void iowarrior_callback(struct urb *urb) 156 156 { 157 - struct iowarrior *dev = (struct iowarrior *)urb->context; 157 + struct iowarrior *dev = urb->context; 158 158 int intr_idx; 159 159 int read_idx; 160 160 int aux_idx; ··· 230 230 struct iowarrior *dev; 231 231 int status = urb->status; 232 232 233 - dev = (struct iowarrior *)urb->context; 233 + dev = urb->context; 234 234 /* sync/async unlink faults aren't errors */ 235 235 if (status && 236 236 !(status == -ENOENT ||
+2 -2
drivers/usb/misc/legousbtower.c
··· 753 753 */ 754 754 static 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 757 int status = urb->status; 758 758 int retval; 759 759 ··· 810 810 */ 811 811 static 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 814 int status = urb->status; 815 815 816 816 dbg(4, "%s: enter, status %d", __func__, status);
+1 -1
drivers/usb/misc/usblcd.c
··· 185 185 struct usb_lcd *dev; 186 186 int status = urb->status; 187 187 188 - dev = (struct usb_lcd *)urb->context; 188 + dev = urb->context; 189 189 190 190 /* sync/async unlink faults aren't errors */ 191 191 if (status &&
+2 -2
drivers/usb/misc/usbtest.c
··· 201 201 202 202 static void simple_callback (struct urb *urb) 203 203 { 204 - complete ((struct completion *) urb->context); 204 + complete(urb->context); 205 205 } 206 206 207 207 static struct urb *simple_alloc_urb ( ··· 1046 1046 status = usb_submit_urb (urb, GFP_ATOMIC); 1047 1047 if (status) { 1048 1048 urb->status = status; 1049 - complete ((struct completion *) urb->context); 1049 + complete(urb->context); 1050 1050 } 1051 1051 } 1052 1052
+1 -1
drivers/usb/serial/belkin_sa.c
··· 248 248 249 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 252 struct belkin_sa_private *priv; 253 253 unsigned char *data = urb->transfer_buffer; 254 254 int retval;
+3 -3
drivers/usb/serial/cyberjack.c
··· 300 300 301 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 304 struct cyberjack_private *priv = usb_get_serial_port_data(port); 305 305 unsigned char *data = urb->transfer_buffer; 306 306 int status = urb->status; ··· 357 357 358 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 361 struct cyberjack_private *priv = usb_get_serial_port_data(port); 362 362 struct tty_struct *tty; 363 363 unsigned char *data = urb->transfer_buffer; ··· 409 409 410 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 413 struct cyberjack_private *priv = usb_get_serial_port_data(port); 414 414 int status = urb->status; 415 415
+2 -2
drivers/usb/serial/cypress_m8.c
··· 1209 1209 1210 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 1213 struct cypress_private *priv = usb_get_serial_port_data(port); 1214 1214 struct tty_struct *tty; 1215 1215 unsigned char *data = urb->transfer_buffer; ··· 1361 1361 1362 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 1365 struct cypress_private *priv = usb_get_serial_port_data(port); 1366 1366 int result; 1367 1367 int status = urb->status;
+4 -4
drivers/usb/serial/digi_acceleport.c
··· 1227 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 1231 struct usb_serial *serial; 1232 1232 struct digi_port *priv; 1233 1233 struct digi_serial *serial_priv; ··· 1605 1605 1606 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 1609 struct digi_port *priv; 1610 1610 struct digi_serial *serial_priv; 1611 1611 int ret; ··· 1664 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 1668 struct tty_struct *tty = port->tty; 1669 1669 struct digi_port *priv = usb_get_serial_port_data(port); 1670 1670 int opcode = ((unsigned char *)urb->transfer_buffer)[0]; ··· 1754 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 1758 struct usb_serial *serial = port->serial; 1759 1759 struct digi_port *priv = usb_get_serial_port_data(port); 1760 1760 int opcode, line, status, val;
+1 -1
drivers/usb/serial/empeg.c
··· 340 340 341 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 344 struct tty_struct *tty; 345 345 unsigned char *data = urb->transfer_buffer; 346 346 int result;
+2 -2
drivers/usb/serial/ftdi_sio.c
··· 1377 1377 static void ftdi_write_bulk_callback (struct urb *urb) 1378 1378 { 1379 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 1381 struct ftdi_private *priv; 1382 1382 int data_offset; /* will be 1 for the SIO and 0 otherwise */ 1383 1383 unsigned long countback; ··· 1460 1460 1461 1461 static void ftdi_read_bulk_callback (struct urb *urb) 1462 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 1464 struct tty_struct *tty; 1465 1465 struct ftdi_private *priv; 1466 1466 unsigned long countread;
+3 -3
drivers/usb/serial/garmin_gps.c
··· 1046 1046 static void garmin_write_bulk_callback (struct urb *urb) 1047 1047 { 1048 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 1050 int status = urb->status; 1051 1051 1052 1052 if (port) { ··· 1286 1286 static void garmin_read_bulk_callback (struct urb *urb) 1287 1287 { 1288 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 1290 struct usb_serial *serial = port->serial; 1291 1291 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1292 1292 unsigned char *data = urb->transfer_buffer; ··· 1344 1344 { 1345 1345 unsigned long flags; 1346 1346 int retval; 1347 - struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1347 + struct usb_serial_port *port = urb->context; 1348 1348 struct usb_serial *serial = port->serial; 1349 1349 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1350 1350 unsigned char *data = urb->transfer_buffer;
+2 -2
drivers/usb/serial/generic.c
··· 331 331 332 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 335 unsigned char *data = urb->transfer_buffer; 336 336 int status = urb->status; 337 337 unsigned long flags; ··· 359 359 360 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 363 int status = urb->status; 364 364 365 365 dbg("%s - port %d", __func__, port->number);
+4 -4
drivers/usb/serial/io_edgeport.c
··· 589 589 *****************************************************************************/ 590 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 593 struct edgeport_port *edge_port; 594 594 struct usb_serial_port *port; 595 595 unsigned char *data = urb->transfer_buffer; ··· 689 689 *****************************************************************************/ 690 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 693 unsigned char *data = urb->transfer_buffer; 694 694 int retval; 695 695 __u16 raw_data_length; ··· 749 749 *****************************************************************************/ 750 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 753 struct tty_struct *tty; 754 754 int status = urb->status; 755 755 ··· 782 782 *****************************************************************************/ 783 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 786 struct tty_struct *tty; 787 787 int status = urb->status; 788 788
+3 -3
drivers/usb/serial/io_ti.c
··· 1710 1710 1711 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 1714 struct usb_serial_port *port; 1715 1715 struct edgeport_port *edge_port; 1716 1716 unsigned char *data = urb->transfer_buffer; ··· 1803 1803 1804 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 1807 unsigned char *data = urb->transfer_buffer; 1808 1808 struct tty_struct *tty; 1809 1809 int retval = 0; ··· 1897 1897 1898 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 1901 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 1902 1902 int status = urb->status; 1903 1903
+2 -2
drivers/usb/serial/ipaq.c
··· 729 729 730 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 733 struct tty_struct *tty; 734 734 unsigned char *data = urb->transfer_buffer; 735 735 int result; ··· 869 869 870 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 873 struct ipaq_private *priv = usb_get_serial_port_data(port); 874 874 unsigned long flags; 875 875 int result;
+2 -2
drivers/usb/serial/ir-usb.c
··· 393 393 394 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 397 int status = urb->status; 398 398 399 399 dbg("%s - port %d", __func__, port->number); ··· 417 417 418 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 421 struct tty_struct *tty; 422 422 unsigned char *data = urb->transfer_buffer; 423 423 int result;
+8 -8
drivers/usb/serial/iuu_phoenix.c
··· 186 186 187 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 190 int result; 191 191 dbg("%s - enter", __func__); 192 192 ··· 240 240 */ 241 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 244 struct iuu_private *priv = usb_get_serial_port_data(port); 245 245 u8 *st; 246 246 dbg("%s - enter", __func__); ··· 270 270 271 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 274 int result; 275 275 dbg("%s - enter", __func__); 276 276 ··· 392 392 393 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 396 int result; 397 397 char *buf_ptr = port->write_urb->transfer_buffer; 398 398 *buf_ptr++ = IUU_SET_LED; ··· 413 413 414 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 417 int result; 418 418 char *buf_ptr = port->write_urb->transfer_buffer; 419 419 if (xmas == 1) { ··· 616 616 617 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 620 unsigned char *data = urb->transfer_buffer; 621 621 struct tty_struct *tty; 622 622 dbg("%s - urb->status = %d", __func__, urb->status); ··· 692 692 693 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 696 struct iuu_private *priv = usb_get_serial_port_data(port); 697 697 unsigned int flags; 698 698 int status; ··· 781 781 782 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 785 int result; 786 786 dbg("%s - enter", __func__); 787 787
+14 -14
drivers/usb/serial/keyspan.c
··· 445 445 return; 446 446 } 447 447 448 - port = (struct usb_serial_port *) urb->context; 448 + port = urb->context; 449 449 tty = port->tty; 450 450 if (tty && urb->actual_length) { 451 451 /* 0x80 bit is error flag */ ··· 490 490 struct usb_serial_port *port; 491 491 struct keyspan_port_private *p_priv; 492 492 493 - port = (struct usb_serial_port *) urb->context; 493 + port = urb->context; 494 494 p_priv = usb_get_serial_port_data(port); 495 495 dbg ("%s - urb %d", __func__, urb == p_priv->out_urbs[1]); 496 496 ··· 509 509 struct usb_serial_port *port; 510 510 struct keyspan_port_private *p_priv; 511 511 512 - port = (struct usb_serial_port *) urb->context; 512 + port = urb->context; 513 513 p_priv = usb_get_serial_port_data(port); 514 514 515 515 if (p_priv->resend_cont) { ··· 528 528 int old_dcd_state, err; 529 529 int status = urb->status; 530 530 531 - serial = (struct usb_serial *) urb->context; 531 + serial = urb->context; 532 532 533 533 if (status) { 534 534 dbg("%s - nonzero status: %x", __func__, status); ··· 599 599 600 600 dbg ("%s", __func__); 601 601 602 - port = (struct usb_serial_port *) urb->context; 602 + port = urb->context; 603 603 p_priv = usb_get_serial_port_data(port); 604 604 data = urb->transfer_buffer; 605 605 ··· 613 613 return; 614 614 } 615 615 616 - port = (struct usb_serial_port *) urb->context; 616 + port = urb->context; 617 617 p_priv = usb_get_serial_port_data(port); 618 618 data = urb->transfer_buffer; 619 619 ··· 647 647 struct usb_serial_port *port; 648 648 struct keyspan_port_private *p_priv; 649 649 650 - port = (struct usb_serial_port *) urb->context; 650 + port = urb->context; 651 651 p_priv = usb_get_serial_port_data(port); 652 652 653 653 if (p_priv->resend_cont) { ··· 667 667 int old_dcd_state; 668 668 int status = urb->status; 669 669 670 - serial = (struct usb_serial *) urb->context; 670 + serial = urb->context; 671 671 672 672 if (status) { 673 673 dbg("%s - nonzero status: %x", __func__, status); ··· 733 733 734 734 dbg ("%s", __func__); 735 735 736 - serial = (struct usb_serial *) urb->context; 736 + serial = urb->context; 737 737 for (i = 0; i < serial->num_ports; ++i) { 738 738 port = serial->port[i]; 739 739 p_priv = usb_get_serial_port_data(port); ··· 761 761 762 762 dbg ("%s", __func__); 763 763 764 - serial = (struct usb_serial *) urb->context; 764 + serial = urb->context; 765 765 766 766 if (status) { 767 767 dbg("%s - nonzero status: %x", __func__, status); ··· 836 836 return; 837 837 } 838 838 839 - port = (struct usb_serial_port *) urb->context; 839 + port = urb->context; 840 840 tty = port->tty; 841 841 if (tty && urb->actual_length) { 842 842 /* 0x80 bit is error flag */ ··· 973 973 return; 974 974 } 975 975 976 - port = (struct usb_serial_port *) urb->context; 976 + port = urb->context; 977 977 p_priv = usb_get_serial_port_data(port); 978 978 979 979 tty = port->tty; ··· 1037 1037 int old_dcd_state, err; 1038 1038 int status = urb->status; 1039 1039 1040 - serial = (struct usb_serial *) urb->context; 1040 + serial = urb->context; 1041 1041 1042 1042 if (status) { 1043 1043 dbg("%s - nonzero status: %x", __func__, status); ··· 1084 1084 struct usb_serial_port *port; 1085 1085 struct keyspan_port_private *p_priv; 1086 1086 1087 - port = (struct usb_serial_port *) urb->context; 1087 + port = urb->context; 1088 1088 p_priv = usb_get_serial_port_data(port); 1089 1089 1090 1090 if (p_priv->resend_cont) {
+2 -2
drivers/usb/serial/keyspan_pda.c
··· 214 214 215 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 218 struct tty_struct *tty = port->tty; 219 219 unsigned char *data = urb->transfer_buffer; 220 220 int i; ··· 608 608 609 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 612 struct keyspan_pda_private *priv; 613 613 614 614 port->write_urb_busy = 0;
+2 -2
drivers/usb/serial/kl5kusb105.c
··· 567 567 568 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 571 int status = urb->status; 572 572 573 573 dbg("%s - port %d", __func__, port->number); ··· 628 628 629 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 632 struct klsi_105_private *priv = usb_get_serial_port_data(port); 633 633 struct tty_struct *tty; 634 634 unsigned char *data = urb->transfer_buffer;
+1 -1
drivers/usb/serial/mct_u232.c
··· 514 514 515 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 518 struct mct_u232_private *priv = usb_get_serial_port_data(port); 519 519 struct usb_serial *serial = port->serial; 520 520 struct tty_struct *tty;
+4 -4
drivers/usb/serial/mos7840.c
··· 449 449 int result = 0; 450 450 int status = urb->status; 451 451 452 - mos7840_port = (struct moschip_port *)urb->context; 452 + mos7840_port = urb->context; 453 453 454 454 switch (status) { 455 455 case 0: ··· 554 554 length = urb->actual_length; 555 555 data = urb->transfer_buffer; 556 556 557 - serial = (struct usb_serial *)urb->context; 557 + serial = urb->context; 558 558 559 559 /* Moschip get 5 bytes 560 560 * Byte 1 IIR Port 1 (port.number is 0) ··· 685 685 return; 686 686 } 687 687 688 - mos7840_port = (struct moschip_port *)urb->context; 688 + mos7840_port = urb->context; 689 689 if (!mos7840_port) { 690 690 dbg("%s", "NULL mos7840_port pointer \n"); 691 691 return; ··· 752 752 int status = urb->status; 753 753 int i; 754 754 755 - mos7840_port = (struct moschip_port *)urb->context; 755 + mos7840_port = urb->context; 756 756 spin_lock(&mos7840_port->pool_lock); 757 757 for (i = 0; i < NUM_URBS; i++) { 758 758 if (urb == mos7840_port->write_urb_pool[i]) {
+2 -2
drivers/usb/serial/omninet.c
··· 194 194 195 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 198 unsigned char *data = urb->transfer_buffer; 199 199 struct omninet_header *header = (struct omninet_header *) &data[0]; 200 200 int status = urb->status; ··· 309 309 static void omninet_write_bulk_callback (struct urb *urb) 310 310 { 311 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 313 int status = urb->status; 314 314 315 315 dbg("%s - port %0x\n", __func__, port->number);
+3 -3
drivers/usb/serial/option.c
··· 545 545 dbg("%s: %p", __func__, urb); 546 546 547 547 endpoint = usb_pipeendpoint(urb->pipe); 548 - port = (struct usb_serial_port *) urb->context; 548 + port = urb->context; 549 549 550 550 if (status) { 551 551 dbg("%s: nonzero status: %d on endpoint %02x.", ··· 579 579 580 580 dbg("%s", __func__); 581 581 582 - port = (struct usb_serial_port *) urb->context; 582 + port = urb->context; 583 583 584 584 usb_serial_port_softint(port); 585 585 ··· 597 597 { 598 598 int err; 599 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 601 struct option_port_private *portdata = usb_get_serial_port_data(port); 602 602 struct usb_serial *serial = port->serial; 603 603
+3 -3
drivers/usb/serial/oti6858.c
··· 871 871 872 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 875 struct oti6858_private *priv = usb_get_serial_port_data(port); 876 876 int transient = 0, can_recv = 0, resubmit = 1; 877 877 int status = urb->status; ··· 985 985 986 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 989 struct oti6858_private *priv = usb_get_serial_port_data(port); 990 990 struct tty_struct *tty; 991 991 unsigned char *data = urb->transfer_buffer; ··· 1038 1038 1039 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 1042 struct oti6858_private *priv = usb_get_serial_port_data(port); 1043 1043 int status = urb->status; 1044 1044 int result;
+3 -3
drivers/usb/serial/pl2303.c
··· 945 945 946 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 949 unsigned char *data = urb->transfer_buffer; 950 950 unsigned int actual_length = urb->actual_length; 951 951 int status = urb->status; ··· 985 985 986 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 989 struct pl2303_private *priv = usb_get_serial_port_data(port); 990 990 struct tty_struct *tty; 991 991 unsigned char *data = urb->transfer_buffer; ··· 1068 1068 1069 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 1072 struct pl2303_private *priv = usb_get_serial_port_data(port); 1073 1073 int result; 1074 1074 int status = urb->status;
+1 -1
drivers/usb/serial/safe_serial.c
··· 195 195 196 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 199 unsigned char *data = urb->transfer_buffer; 200 200 unsigned char length = urb->actual_length; 201 201 int result;
+2 -2
drivers/usb/serial/sierra.c
··· 457 457 dbg("%s: %p", __func__, urb); 458 458 459 459 endpoint = usb_pipeendpoint(urb->pipe); 460 - port = (struct usb_serial_port *) urb->context; 460 + port = urb->context; 461 461 462 462 if (status) { 463 463 dbg("%s: nonzero status: %d on endpoint %02x.", ··· 487 487 { 488 488 int err; 489 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 491 struct sierra_port_private *portdata = usb_get_serial_port_data(port); 492 492 struct usb_serial *serial = port->serial; 493 493
+3 -3
drivers/usb/serial/ti_usb_3410_5052.c
··· 1098 1098 1099 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 1102 struct usb_serial_port *port; 1103 1103 struct usb_serial *serial = tdev->td_serial; 1104 1104 struct ti_port *tport; ··· 1181 1181 1182 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 1185 struct usb_serial_port *port = tport->tp_port; 1186 1186 struct device *dev = &urb->dev->dev; 1187 1187 int status = urb->status; ··· 1247 1247 1248 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 1251 struct usb_serial_port *port = tport->tp_port; 1252 1252 struct device *dev = &urb->dev->dev; 1253 1253 int status = urb->status;
+3 -3
drivers/usb/serial/visor.c
··· 478 478 479 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 482 struct visor_private *priv = usb_get_serial_port_data(port); 483 483 int status = urb->status; 484 484 unsigned long flags; ··· 502 502 503 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 506 struct visor_private *priv = usb_get_serial_port_data(port); 507 507 unsigned char *data = urb->transfer_buffer; 508 508 int status = urb->status; ··· 553 553 554 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 557 int status = urb->status; 558 558 int result; 559 559
+3 -3
drivers/usb/serial/whiteheat.c
··· 965 965 966 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 969 struct whiteheat_command_private *command_info; 970 970 int status = urb->status; 971 971 unsigned char *data = urb->transfer_buffer; ··· 1015 1015 1016 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 1019 struct whiteheat_urb_wrap *wrap; 1020 1020 unsigned char *data = urb->transfer_buffer; 1021 1021 struct whiteheat_private *info = usb_get_serial_port_data(port); ··· 1059 1059 1060 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 1063 struct whiteheat_private *info = usb_get_serial_port_data(port); 1064 1064 struct whiteheat_urb_wrap *wrap; 1065 1065 int status = urb->status;
+1 -1
drivers/usb/storage/transport.c
··· 110 110 */ 111 111 static 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 115 complete(urb_done_ptr); 116 116 }
+1 -1
drivers/usb/usb-skeleton.c
··· 212 212 { 213 213 struct usb_skel *dev; 214 214 215 - dev = (struct usb_skel *)urb->context; 215 + dev = urb->context; 216 216 217 217 /* sync/async unlink faults aren't errors */ 218 218 if (urb->status) {