aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Ernst <olebowle@gmx.com>2016-07-30 09:19:27 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-22 10:21:15 -0400
commit552001e67693487ce339ee6b72a3eeecb03b14e7 (patch)
tree8c2dcf6e05306f99f356ac73cdf9598504727924
parent43e2ea63eb9781bc980cbcb954d26fec8ad108e6 (diff)
[media] Partly revert "[media] rc-core: allow calling rc_open with device not initialized"
This partly reverts commit 078600f514a12fd763ac84c86af68ef5b5267563. Due to the relocation of input_register_device() call, holding down a button on an IR remote no longer resulted in repeated key down events. Signed-off-by: Ole Ernst <olebowle@gmx.com> Tested-by: Matthias Reichl <hias@horus.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/rc/rc-main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 8e7f2929fa6f..26fd63bdf8e8 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1460,6 +1460,10 @@ int rc_register_device(struct rc_dev *dev)
1460 dev->input_dev->phys = dev->input_phys; 1460 dev->input_dev->phys = dev->input_phys;
1461 dev->input_dev->name = dev->input_name; 1461 dev->input_dev->name = dev->input_name;
1462 1462
1463 rc = input_register_device(dev->input_dev);
1464 if (rc)
1465 goto out_table;
1466
1463 /* 1467 /*
1464 * Default delay of 250ms is too short for some protocols, especially 1468 * Default delay of 250ms is too short for some protocols, especially
1465 * since the timeout is currently set to 250ms. Increase it to 500ms, 1469 * since the timeout is currently set to 250ms. Increase it to 500ms,
@@ -1475,11 +1479,6 @@ int rc_register_device(struct rc_dev *dev)
1475 */ 1479 */
1476 dev->input_dev->rep[REP_PERIOD] = 125; 1480 dev->input_dev->rep[REP_PERIOD] = 125;
1477 1481
1478 /* rc_open will be called here */
1479 rc = input_register_device(dev->input_dev);
1480 if (rc)
1481 goto out_table;
1482
1483 path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); 1482 path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
1484 dev_info(&dev->dev, "%s as %s\n", 1483 dev_info(&dev->dev, "%s as %s\n",
1485 dev->input_name ?: "Unspecified device", path ?: "N/A"); 1484 dev->input_name ?: "Unspecified device", path ?: "N/A");