@@ -89,6 +89,7 @@ static int start_cbsend(struct cardstate *);
89
89
90
90
struct bas_cardstate {
91
91
struct usb_device * udev ; /* USB device pointer */
92
+ struct cardstate * cs ;
92
93
struct usb_interface * interface ; /* interface for this device */
93
94
unsigned char minor ; /* starting minor number */
94
95
@@ -436,8 +437,7 @@ static void check_pending(struct bas_cardstate *ucs)
436
437
static void cmd_in_timeout (struct timer_list * t )
437
438
{
438
439
struct bas_cardstate * ucs = from_timer (ucs , t , timer_cmd_in );
439
- struct urb * urb = ucs -> urb_int_in ;
440
- struct cardstate * cs = urb -> context ;
440
+ struct cardstate * cs = ucs -> cs ;
441
441
int rc ;
442
442
443
443
if (!ucs -> rcvbuf_size ) {
@@ -643,8 +643,7 @@ static void int_in_work(struct work_struct *work)
643
643
static void int_in_resubmit (struct timer_list * t )
644
644
{
645
645
struct bas_cardstate * ucs = from_timer (ucs , t , timer_int_in );
646
- struct urb * urb = ucs -> urb_int_in ;
647
- struct cardstate * cs = urb -> context ;
646
+ struct cardstate * cs = ucs -> cs ;
648
647
int rc ;
649
648
650
649
if (ucs -> retry_int_in ++ >= BAS_RETRY ) {
@@ -1446,8 +1445,7 @@ static void read_iso_tasklet(unsigned long data)
1446
1445
static void req_timeout (struct timer_list * t )
1447
1446
{
1448
1447
struct bas_cardstate * ucs = from_timer (ucs , t , timer_ctrl );
1449
- struct urb * urb = ucs -> urb_int_in ;
1450
- struct cardstate * cs = urb -> context ;
1448
+ struct cardstate * cs = ucs -> cs ;
1451
1449
int pending ;
1452
1450
unsigned long flags ;
1453
1451
@@ -1843,8 +1841,7 @@ static void write_command_callback(struct urb *urb)
1843
1841
static void atrdy_timeout (struct timer_list * t )
1844
1842
{
1845
1843
struct bas_cardstate * ucs = from_timer (ucs , t , timer_atrdy );
1846
- struct urb * urb = ucs -> urb_int_in ;
1847
- struct cardstate * cs = urb -> context ;
1844
+ struct cardstate * cs = ucs -> cs ;
1848
1845
1849
1846
dev_warn (cs -> dev , "timeout waiting for HD_READY_SEND_ATDATA\n" );
1850
1847
@@ -2217,6 +2214,7 @@ static int gigaset_initcshw(struct cardstate *cs)
2217
2214
}
2218
2215
2219
2216
spin_lock_init (& ucs -> lock );
2217
+ ucs -> cs = cs ;
2220
2218
timer_setup (& ucs -> timer_ctrl , req_timeout , 0 );
2221
2219
timer_setup (& ucs -> timer_atrdy , atrdy_timeout , 0 );
2222
2220
timer_setup (& ucs -> timer_cmd_in , cmd_in_timeout , 0 );
0 commit comments