summaryrefslogtreecommitdiff
path: root/drivers/media/video/ir-kbd-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-12-11 11:20:59 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-16 00:18:45 -0200
commit579e7d60ba0035228aadad69eb2ffeb138c51311 (patch)
tree0872698fe02dba92cead8e9d9a7ca7e7f38e1291 /drivers/media/video/ir-kbd-i2c.c
parent38ef6aa884e3fd389f7d444b8dd36c16832e36b4 (diff)
V4L/DVB (13617): ir: move input_register_device() to happen inside ir_input_register()
We'll need to register a sysfs class for the IR devices. As such, the better is to have the input_register_device()/input_unregister_device() inside the ir register/unregister functions. Also, solves a naming problem with V4L ir_input_init() function, that were, in fact, registering a device. While here, do a few cleanups at budget-ci IR logic. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r--drivers/media/video/ir-kbd-i2c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 9d8e78dc614e..b86e35386cee 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -438,7 +438,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
dev_name(&client->dev));
/* init + register input device */
- err = ir_input_init(input_dev, &ir->ir, ir_type, ir->ir_codes);
+ err = ir_input_init(input_dev, &ir->ir, ir_type);
if (err < 0)
goto err_out_free;
@@ -446,7 +446,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
input_dev->name = ir->name;
input_dev->phys = ir->phys;
- err = input_register_device(ir->input);
+ err = ir_input_register(ir->input, ir->ir_codes);
if (err)
goto err_out_free;
@@ -460,8 +460,6 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
return 0;
err_out_free:
- ir_input_unregister(input_dev);
- input_free_device(input_dev);
kfree(ir);
return err;
}
@@ -475,7 +473,6 @@ static int ir_remove(struct i2c_client *client)
/* unregister device */
ir_input_unregister(ir->input);
- input_unregister_device(ir->input);
/* free memory */
kfree(ir);