diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-04 03:32:21 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-26 02:10:43 +0400 |
commit | c5540fbb9de39ceec108a889133664a887c2f55a (patch) | |
tree | 92d1523fa4ab99fc27d14dcd3ee00627eeb8a346 /drivers/media/rc/img-ir | |
parent | da6e162d6a4607362f8478c715c797d84d449f8b (diff) | |
download | linux-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/img-ir')
-rw-r--r-- | drivers/media/rc/img-ir/img-ir-hw.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-hw.c b/drivers/media/rc/img-ir/img-ir-hw.c index b0ec55f52228..bfb282a714e8 100644 --- a/drivers/media/rc/img-ir/img-ir-hw.c +++ b/drivers/media/rc/img-ir/img-ir-hw.c @@ -556,8 +556,8 @@ static void img_ir_set_decoder(struct img_ir_priv *priv, hw->mode = IMG_IR_M_NORMAL; /* clear the wakeup scancode filter */ - rdev->scancode_filters[RC_FILTER_WAKEUP].data = 0; - rdev->scancode_filters[RC_FILTER_WAKEUP].mask = 0; + rdev->scancode_wakeup_filter.data = 0; + rdev->scancode_wakeup_filter.mask = 0; /* clear raw filters */ _img_ir_set_filter(priv, NULL); @@ -661,8 +661,8 @@ success: wakeup_protocols = *ir_type; if (!hw->decoder || !hw->decoder->filter) wakeup_protocols = 0; - rc_set_allowed_wakeup_protocols(rdev, wakeup_protocols); - rc_set_enabled_wakeup_protocols(rdev, wakeup_protocols); + rdev->allowed_wakeup_protocols = wakeup_protocols; + rdev->enabled_wakeup_protocols = wakeup_protocols; return 0; } @@ -676,9 +676,9 @@ static void img_ir_set_protocol(struct img_ir_priv *priv, u64 proto) spin_unlock_irq(&rdev->rc_map.lock); mutex_lock(&rdev->lock); - rc_set_enabled_protocols(rdev, proto); - rc_set_allowed_wakeup_protocols(rdev, proto); - rc_set_enabled_wakeup_protocols(rdev, proto); + rdev->enabled_protocols = proto; + rdev->allowed_wakeup_protocols = proto; + rdev->enabled_wakeup_protocols = proto; mutex_unlock(&rdev->lock); } @@ -1003,7 +1003,7 @@ int img_ir_probe_hw(struct img_ir_priv *priv) } rdev->priv = priv; rdev->map_name = RC_MAP_EMPTY; - rc_set_allowed_protocols(rdev, img_ir_allowed_protos(priv)); + rdev->allowed_protocols = img_ir_allowed_protos(priv); rdev->input_name = "IMG Infrared Decoder"; rdev->s_filter = img_ir_set_normal_filter; rdev->s_wakeup_filter = img_ir_set_wakeup_filter; |