diff mbox

=?windows-1256?Q?[PATCH]_dv?= =?windows-1256?Q?b-usb.h_fu?= =?windows-1256?Q?nction_rc5?= =?windows-1256?Q?=5Fscan=FE?=

Message ID BLU157-w490B704529846014C4C669D8820@phx.gbl (mailing list archive)
State Accepted
Headers show

Commit Message

Manoel Pinheiro May 7, 2011, 6:49 a.m. UTC
Hi,

The function "rc5_scan" in "dvb_usb.h" is returning invalid value.
The value should be returned "u16" but is returning "u8".

See example below in "drivers/media/dvb/dvb-usb/opera1.c".


/*------------------------------------------------------*/

drivers/media/dvb/dvb-usb/opera1.c

static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state)
{

.
.
.

        send_key = (send_key & 0xffff) | 0x0100;

        for (i = 0; i < ARRAY_SIZE(rc_map_opera1_table); i++) {
            if (rc5_scan(&rc_map_opera1_table[i]) == (send_key & 0xffff)) {
                *state = REMOTE_KEY_PRESSED;
                *event = rc_map_opera1_table[i].keycode;
                opst->last_key_pressed =
                    rc_map_opera1_table[i].keycode;
                break;
            }
            opst->last_key_pressed = 0;
        }

}

/*------------------------------------------------------*/


Signed-off-by: Manoel Pinheiro



 		 	   		  
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 76a8096..7d35d07 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -85,7 +85,7 @@  static inline u8 rc5_data(struct rc_map_table *key)
     return key->scancode & 0xff;
 }

-static inline u8 rc5_scan(struct rc_map_table *key)
+static inline u16 rc5_scan(struct rc_map_table *key)
 {
     return key->scancode & 0xffff;
 }