summaryrefslogtreecommitdiff
path: root/drivers/media/rc/imon.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2014-04-04 03:32:21 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-26 02:10:43 +0400
commitc5540fbb9de39ceec108a889133664a887c2f55a (patch)
tree92d1523fa4ab99fc27d14dcd3ee00627eeb8a346 /drivers/media/rc/imon.c
parentda6e162d6a4607362f8478c715c797d84d449f8b (diff)
downloadlinux-c5540fbb9de39ceec108a889133664a887c2f55a.tar.xz
[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>
Diffstat (limited to 'drivers/media/rc/imon.c')
-rw-r--r--drivers/media/rc/imon.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index eb37f2622364..ac05c364f663 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1017,7 +1017,7 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 *rc_type)
unsigned char ir_proto_packet[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
- if (*rc_type && !rc_protocols_allowed(rc, *rc_type))
+ if (*rc_type && !(*rc_type & rc->allowed_protocols))
dev_warn(dev, "Looks like you're trying to use an IR protocol "
"this device does not support\n");
@@ -1870,8 +1870,7 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx)
rdev->priv = ictx;
rdev->driver_type = RC_DRIVER_SCANCODE;
- /* iMON PAD or MCE */
- rc_set_allowed_protocols(rdev, RC_BIT_OTHER | RC_BIT_RC6_MCE);
+ rdev->allowed_protocols = RC_BIT_OTHER | RC_BIT_RC6_MCE; /* iMON PAD or MCE */
rdev->change_protocol = imon_ir_change_protocol;
rdev->driver_name = MOD_NAME;
@@ -1884,7 +1883,7 @@ static struct rc_dev *imon_init_rdev(struct imon_context *ictx)
if (ictx->product == 0xffdc) {
imon_get_ffdc_type(ictx);
- rc_set_allowed_protocols(rdev, ictx->rc_type);
+ rdev->allowed_protocols = ictx->rc_type;
}
imon_set_display_type(ictx);