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/misc | |
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/misc')
-rw-r--r-- | drivers/usb/misc/auerswald.c | 12 | ||||
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/iowarrior.c | 4 | ||||
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 4 | ||||
-rw-r--r-- | drivers/usb/misc/usblcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/usbtest.c | 4 |
6 files changed, 14 insertions, 14 deletions
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 */ |
595 | static void auerchain_blocking_completion (struct urb *urb) | 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 | 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 */ |
848 | static void auerchar_ctrlwrite_complete (struct urb * urb) | 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 | 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 */ |
861 | static void auerswald_ctrlread_wretcomplete (struct urb * urb) | 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 | 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 | ||
747 | static void ftdi_elan_write_bulk_callback(struct urb *urb) | 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 | 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 | */ |
155 | static void iowarrior_callback(struct urb *urb) | 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 | 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 | */ |
754 | static void tower_interrupt_in_callback (struct urb *urb) | 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 | int status = urb->status; | 757 | int status = urb->status; |
758 | int retval; | 758 | int retval; |
759 | 759 | ||
@@ -810,7 +810,7 @@ exit: | |||
810 | */ | 810 | */ |
811 | static void tower_interrupt_out_callback (struct urb *urb) | 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 | 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 | ||
202 | static void simple_callback (struct urb *urb) | 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 | static struct urb *simple_alloc_urb ( | 207 | static 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 | ||