aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/cxusb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-07-31 10:24:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:43 -0400
commit34abf2194499571b2efa6b4aface8c0ea0c47ce1 (patch)
treee2698d258ad65a7878fbc4b6c9e3de81228fb3ef /drivers/media/dvb/dvb-usb/cxusb.c
parent0172fea3c0cf55b61bc94738db3ece513264774c (diff)
V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key
dvb-usb has its own IR handle code. Now that we have a Remote Controller subsystem, we should start using it. So, remove this struct, in favor of the similar struct defined at the RC subsystem. This is a big, but trivial patch. It is a 3 line delect, plus lots of rename on several dvb-usb files. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 11e9e85dac86..22fc0a99f5ad 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -385,7 +385,7 @@ static int cxusb_d680_dmb_streaming_ctrl(
385 385
386static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 386static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
387{ 387{
388 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 388 struct ir_scancode *keymap = d->props.rc_key_map;
389 u8 ircode[4]; 389 u8 ircode[4];
390 int i; 390 int i;
391 391
@@ -397,7 +397,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
397 for (i = 0; i < d->props.rc_key_map_size; i++) { 397 for (i = 0; i < d->props.rc_key_map_size; i++) {
398 if (rc5_custom(&keymap[i]) == ircode[2] && 398 if (rc5_custom(&keymap[i]) == ircode[2] &&
399 rc5_data(&keymap[i]) == ircode[3]) { 399 rc5_data(&keymap[i]) == ircode[3]) {
400 *event = keymap[i].event; 400 *event = keymap[i].keycode;
401 *state = REMOTE_KEY_PRESSED; 401 *state = REMOTE_KEY_PRESSED;
402 402
403 return 0; 403 return 0;
@@ -410,7 +410,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
410static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, 410static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
411 int *state) 411 int *state)
412{ 412{
413 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 413 struct ir_scancode *keymap = d->props.rc_key_map;
414 u8 ircode[4]; 414 u8 ircode[4];
415 int i; 415 int i;
416 struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, 416 struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD,
@@ -425,7 +425,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
425 for (i = 0; i < d->props.rc_key_map_size; i++) { 425 for (i = 0; i < d->props.rc_key_map_size; i++) {
426 if (rc5_custom(&keymap[i]) == ircode[1] && 426 if (rc5_custom(&keymap[i]) == ircode[1] &&
427 rc5_data(&keymap[i]) == ircode[2]) { 427 rc5_data(&keymap[i]) == ircode[2]) {
428 *event = keymap[i].event; 428 *event = keymap[i].keycode;
429 *state = REMOTE_KEY_PRESSED; 429 *state = REMOTE_KEY_PRESSED;
430 430
431 return 0; 431 return 0;
@@ -438,7 +438,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
438static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, 438static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
439 int *state) 439 int *state)
440{ 440{
441 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 441 struct ir_scancode *keymap = d->props.rc_key_map;
442 u8 ircode[2]; 442 u8 ircode[2];
443 int i; 443 int i;
444 444
@@ -451,7 +451,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
451 for (i = 0; i < d->props.rc_key_map_size; i++) { 451 for (i = 0; i < d->props.rc_key_map_size; i++) {
452 if (rc5_custom(&keymap[i]) == ircode[0] && 452 if (rc5_custom(&keymap[i]) == ircode[0] &&
453 rc5_data(&keymap[i]) == ircode[1]) { 453 rc5_data(&keymap[i]) == ircode[1]) {
454 *event = keymap[i].event; 454 *event = keymap[i].keycode;
455 *state = REMOTE_KEY_PRESSED; 455 *state = REMOTE_KEY_PRESSED;
456 456
457 return 0; 457 return 0;
@@ -461,7 +461,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
461 return 0; 461 return 0;
462} 462}
463 463
464static struct dvb_usb_rc_key ir_codes_dvico_mce_table[] = { 464static struct ir_scancode ir_codes_dvico_mce_table[] = {
465 { 0xfe02, KEY_TV }, 465 { 0xfe02, KEY_TV },
466 { 0xfe0e, KEY_MP3 }, 466 { 0xfe0e, KEY_MP3 },
467 { 0xfe1a, KEY_DVD }, 467 { 0xfe1a, KEY_DVD },
@@ -509,7 +509,7 @@ static struct dvb_usb_rc_key ir_codes_dvico_mce_table[] = {
509 { 0xfe4e, KEY_POWER }, 509 { 0xfe4e, KEY_POWER },
510}; 510};
511 511
512static struct dvb_usb_rc_key ir_codes_dvico_portable_table[] = { 512static struct ir_scancode ir_codes_dvico_portable_table[] = {
513 { 0xfc02, KEY_SETUP }, /* Profile */ 513 { 0xfc02, KEY_SETUP }, /* Profile */
514 { 0xfc43, KEY_POWER2 }, 514 { 0xfc43, KEY_POWER2 },
515 { 0xfc06, KEY_EPG }, 515 { 0xfc06, KEY_EPG },
@@ -548,7 +548,7 @@ static struct dvb_usb_rc_key ir_codes_dvico_portable_table[] = {
548 { 0xfc00, KEY_UNKNOWN }, /* HD */ 548 { 0xfc00, KEY_UNKNOWN }, /* HD */
549}; 549};
550 550
551static struct dvb_usb_rc_key ir_codes_d680_dmb_table[] = { 551static struct ir_scancode ir_codes_d680_dmb_table[] = {
552 { 0x0038, KEY_UNKNOWN }, /* TV/AV */ 552 { 0x0038, KEY_UNKNOWN }, /* TV/AV */
553 { 0x080c, KEY_ZOOM }, 553 { 0x080c, KEY_ZOOM },
554 { 0x0800, KEY_0 }, 554 { 0x0800, KEY_0 },