Commit 552001e6 authored by Ole Ernst's avatar Ole Ernst Committed by Mauro Carvalho Chehab

[media] Partly revert "[media] rc-core: allow calling rc_open with device not initialized"

This partly reverts commit 078600f5.

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: default avatarOle Ernst <olebowle@gmx.com>
Tested-by: default avatarMatthias Reichl <hias@horus.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 43e2ea63
...@@ -1460,6 +1460,10 @@ int rc_register_device(struct rc_dev *dev) ...@@ -1460,6 +1460,10 @@ int rc_register_device(struct rc_dev *dev)
dev->input_dev->phys = dev->input_phys; dev->input_dev->phys = dev->input_phys;
dev->input_dev->name = dev->input_name; dev->input_dev->name = dev->input_name;
rc = input_register_device(dev->input_dev);
if (rc)
goto out_table;
/* /*
* Default delay of 250ms is too short for some protocols, especially * Default delay of 250ms is too short for some protocols, especially
* since the timeout is currently set to 250ms. Increase it to 500ms, * 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,11 +1479,6 @@ int rc_register_device(struct rc_dev *dev)
*/ */
dev->input_dev->rep[REP_PERIOD] = 125; dev->input_dev->rep[REP_PERIOD] = 125;
/* rc_open will be called here */
rc = input_register_device(dev->input_dev);
if (rc)
goto out_table;
path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL); path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
dev_info(&dev->dev, "%s as %s\n", dev_info(&dev->dev, "%s as %s\n",
dev->input_name ?: "Unspecified device", path ?: "N/A"); dev->input_name ?: "Unspecified device", path ?: "N/A");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment