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