|
|
2235f17 |
From: "Ole Ernst <olebowle@unknown.net>"
|
|
|
2235f17 |
Date: Sat, 30 Jul 2016 15:19:27 +0200
|
|
|
2235f17 |
Subject: Partly revert "[media] rc-core: allow calling rc_open with device not initialized"
|
|
|
2235f17 |
|
|
|
2235f17 |
This partly reverts commit 078600f514a12fd763ac84c86af68ef5b5267563.
|
|
|
2235f17 |
|
|
|
2235f17 |
Due to the relocation of input_register_device() call, holding down a
|
|
|
2235f17 |
button on an IR remote no longer resulted in repeated key down events.
|
|
|
2235f17 |
|
|
|
2235f17 |
See: http://www.spinics.net/lists/linux-media/msg103384.html
|
|
|
2235f17 |
|
|
|
2235f17 |
Signed-off-by: Ole Ernst <olebowle@xxxxxxx>
|
|
|
2235f17 |
---
|
|
|
2235f17 |
drivers/media/rc/rc-main.c | 9 ++++-----
|
|
|
2235f17 |
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
2235f17 |
|
|
|
2235f17 |
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
|
|
|
2235f17 |
index 8e7f292..26fd63b 100644
|
|
|
2235f17 |
--- a/drivers/media/rc/rc-main.c
|
|
|
2235f17 |
+++ b/drivers/media/rc/rc-main.c
|
|
|
2235f17 |
@@ -1460,6 +1460,10 @@ int rc_register_device(struct rc_dev *dev)
|
|
|
2235f17 |
dev->input_dev->phys = dev->input_phys;
|
|
|
2235f17 |
dev->input_dev->name = dev->input_name;
|
|
|
2235f17 |
|
|
|
2235f17 |
+ rc = input_register_device(dev->input_dev);
|
|
|
2235f17 |
+ if (rc)
|
|
|
2235f17 |
+ goto out_table;
|
|
|
2235f17 |
+
|
|
|
2235f17 |
/*
|
|
|
2235f17 |
* Default delay of 250ms is too short for some protocols, especially
|
|
|
2235f17 |
* since the timeout is currently set to 250ms. Increase it to 500ms,
|
|
|
2235f17 |
@@ -1475,11 +1479,6 @@ int rc_register_device(struct rc_dev *dev)
|
|
|
2235f17 |
*/
|
|
|
2235f17 |
dev->input_dev->rep[REP_PERIOD] = 125;
|
|
|
2235f17 |
|
|
|
2235f17 |
- /* rc_open will be called here */
|
|
|
2235f17 |
- rc = input_register_device(dev->input_dev);
|
|
|
2235f17 |
- if (rc)
|
|
|
2235f17 |
- goto out_table;
|
|
|
2235f17 |
-
|
|
|
2235f17 |
path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
|
|
|
2235f17 |
dev_info(&dev->dev, "%s as %s\n",
|
|
|
2235f17 |
dev->input_name ?: "Unspecified device", path ?: "N/A");
|
|
|
2235f17 |
--
|
|
|
2235f17 |
2.9.0
|
|
|
2235f17 |
|