[media] rc-core: remove protocol arrays
The basic API of rc-core used to be: dev = rc_allocate_device(); dev->x = a; dev->y = b; dev->z = c; rc_register_device(); which is a pretty common pattern in the kernel, after the introduction of protocol arrays the API looks something like: dev = rc_allocate_device(); dev->x = a; rc_set_allowed_protocols(dev, RC_BIT_X); dev->z = c; rc_register_device(); There's no real need for the protocols to be an array, so change it back to be consistent (and in preparation for the following patches). [m.chehab@samsung.com: added missing changes at some files] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:

committato da
Mauro Carvalho Chehab

parent
da6e162d6a
commit
c5540fbb9d
@@ -745,7 +745,7 @@ static int em28xx_ir_init(struct em28xx *dev)
|
||||
case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
|
||||
rc->map_name = RC_MAP_HAUPPAUGE;
|
||||
ir->get_key_i2c = em28xx_get_key_em_haup;
|
||||
rc_set_allowed_protocols(rc, RC_BIT_RC5);
|
||||
rc->allowed_protocols = RC_BIT_RC5;
|
||||
break;
|
||||
case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE:
|
||||
rc->map_name = RC_MAP_WINFAST_USBII_DELUXE;
|
||||
@@ -761,7 +761,7 @@ static int em28xx_ir_init(struct em28xx *dev)
|
||||
switch (dev->chip_id) {
|
||||
case CHIP_ID_EM2860:
|
||||
case CHIP_ID_EM2883:
|
||||
rc_set_allowed_protocols(rc, RC_BIT_RC5 | RC_BIT_NEC);
|
||||
rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC;
|
||||
ir->get_key = default_polling_getkey;
|
||||
break;
|
||||
case CHIP_ID_EM2884:
|
||||
@@ -769,8 +769,8 @@ static int em28xx_ir_init(struct em28xx *dev)
|
||||
case CHIP_ID_EM28174:
|
||||
case CHIP_ID_EM28178:
|
||||
ir->get_key = em2874_polling_getkey;
|
||||
rc_set_allowed_protocols(rc, RC_BIT_RC5 | RC_BIT_NEC |
|
||||
RC_BIT_RC6_0);
|
||||
rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC |
|
||||
RC_BIT_RC6_0;
|
||||
break;
|
||||
default:
|
||||
err = -ENODEV;
|
||||
|
Fai riferimento in un nuovo problema
Block a user