summaryrefslogtreecommitdiff
path: root/drivers/media/rc/img-ir
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2014-04-05 02:06:01 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-06 18:30:25 +0400
commit23c843b5eb11198e7de3a2af0756d1f897117932 (patch)
tree9a6a57b60b9d048f105d8585c1e84b0e2d4a3bc0 /drivers/media/rc/img-ir
parent42f5e630e06326fa47b3ba86e572b51c36b0a3b1 (diff)
downloadlinux-23c843b5eb11198e7de3a2af0756d1f897117932.tar.xz
[media] rc-core: split dev->s_filter
Overloading dev->s_filter to do two different functions (set wakeup filters and generic hardware filters) makes it impossible to tell what the hardware actually supports, so create a separate dev->s_wakeup_filter and make the distinction explicit. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: James Hogan <james.hogan@imgtec.com> 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.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-hw.c b/drivers/media/rc/img-ir/img-ir-hw.c
index 579a52b3edce..0127dd257a57 100644
--- a/drivers/media/rc/img-ir/img-ir-hw.c
+++ b/drivers/media/rc/img-ir/img-ir-hw.c
@@ -504,6 +504,18 @@ unlock:
return ret;
}
+static int img_ir_set_normal_filter(struct rc_dev *dev,
+ struct rc_scancode_filter *sc_filter)
+{
+ return img_ir_set_filter(dev, RC_FILTER_NORMAL, sc_filter);
+}
+
+static int img_ir_set_wakeup_filter(struct rc_dev *dev,
+ struct rc_scancode_filter *sc_filter)
+{
+ return img_ir_set_filter(dev, RC_FILTER_WAKEUP, sc_filter);
+}
+
/**
* img_ir_set_decoder() - Set the current decoder.
* @priv: IR private data.
@@ -986,7 +998,8 @@ int img_ir_probe_hw(struct img_ir_priv *priv)
rdev->map_name = RC_MAP_EMPTY;
rc_set_allowed_protocols(rdev, img_ir_allowed_protos(priv));
rdev->input_name = "IMG Infrared Decoder";
- rdev->s_filter = img_ir_set_filter;
+ rdev->s_filter = img_ir_set_normal_filter;
+ rdev->s_wakeup_filter = img_ir_set_wakeup_filter;
/* Register hardware decoder */
error = rc_register_device(rdev);