File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
drivers/media/usb/dvb-usb Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -607,10 +607,9 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a)
607
607
static int technisat_usb2_get_ir (struct dvb_usb_device * d )
608
608
{
609
609
struct technisat_usb2_state * state = d -> priv ;
610
- u8 * buf = state -> buf ;
611
- u8 * b ;
612
- int ret ;
613
610
struct ir_raw_event ev ;
611
+ u8 * buf = state -> buf ;
612
+ int i , ret ;
614
613
615
614
buf [0 ] = GET_IR_DATA_VENDOR_REQUEST ;
616
615
buf [1 ] = 0x08 ;
@@ -646,26 +645,25 @@ static int technisat_usb2_get_ir(struct dvb_usb_device *d)
646
645
return 0 ; /* no key pressed */
647
646
648
647
/* decoding */
649
- b = buf + 1 ;
650
648
651
649
#if 0
652
650
deb_rc ("RC: %d " , ret );
653
- debug_dump (b , ret , deb_rc );
651
+ debug_dump (buf + 1 , ret , deb_rc );
654
652
#endif
655
653
656
654
ev .pulse = 0 ;
657
- while (1 ) {
658
- ev .pulse = !ev .pulse ;
659
- ev .duration = (* b * FIRMWARE_CLOCK_DIVISOR * FIRMWARE_CLOCK_TICK ) / 1000 ;
660
- ir_raw_event_store (d -> rc_dev , & ev );
661
-
662
- b ++ ;
663
- if (* b == 0xff ) {
655
+ for (i = 1 ; i < ARRAY_SIZE (state -> buf ); i ++ ) {
656
+ if (buf [i ] == 0xff ) {
664
657
ev .pulse = 0 ;
665
658
ev .duration = 888888 * 2 ;
666
659
ir_raw_event_store (d -> rc_dev , & ev );
667
660
break ;
668
661
}
662
+
663
+ ev .pulse = !ev .pulse ;
664
+ ev .duration = (buf [i ] * FIRMWARE_CLOCK_DIVISOR *
665
+ FIRMWARE_CLOCK_TICK ) / 1000 ;
666
+ ir_raw_event_store (d -> rc_dev , & ev );
669
667
}
670
668
671
669
ir_raw_event_handle (d -> rc_dev );
You can’t perform that action at this time.
0 commit comments