提交 38b32d62 编写于 作者: M Martin Loschwitz 提交者: Linus Torvalds

[PATCH] dvb: cinergyT2: endianness fix for raw remote-control keys

Fixed litte/big-endian conversion for raw remote-control keys.
Signed-off-by: NMartin Loschwitz <madkiss@madkiss.org>
Signed-off-by: NPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: NJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 751c404b
...@@ -699,6 +699,8 @@ static void cinergyt2_query_rc (void *data) ...@@ -699,6 +699,8 @@ static void cinergyt2_query_rc (void *data)
for (n=0; len>0 && n<(len/sizeof(rc_events[0])); n++) { for (n=0; len>0 && n<(len/sizeof(rc_events[0])); n++) {
int i; int i;
/* dprintk(1,"rc_events[%d].value = %x, type=%x\n",n,le32_to_cpu(rc_events[n].value),rc_events[n].type);*/
if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC &&
rc_events[n].value == ~0) rc_events[n].value == ~0)
{ {
...@@ -714,7 +716,7 @@ static void cinergyt2_query_rc (void *data) ...@@ -714,7 +716,7 @@ static void cinergyt2_query_rc (void *data)
cinergyt2->rc_input_event = KEY_MAX; cinergyt2->rc_input_event = KEY_MAX;
for (i=0; i<sizeof(rc_keys)/sizeof(rc_keys[0]); i+=3) { for (i=0; i<sizeof(rc_keys)/sizeof(rc_keys[0]); i+=3) {
if (rc_keys[i+0] == rc_events[n].type && if (rc_keys[i+0] == rc_events[n].type &&
rc_keys[i+1] == rc_events[n].value) rc_keys[i+1] == le32_to_cpu(rc_events[n].value))
{ {
cinergyt2->rc_input_event = rc_keys[i+2]; cinergyt2->rc_input_event = rc_keys[i+2];
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册