V4L/DVB: ir-core: partially convert ir-kbd-i2c.c to not use ir-functions.c
authorDavid Härdeman <david@hardeman.nu>
Mon, 7 Jun 2010 19:32:33 +0000 (16:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 17:53:59 +0000 (14:53 -0300)
Partially convert drivers/media/video/ir-kbd-i2c.c to
not use ir-functions.c

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/ir-kbd-i2c.c
include/media/ir-kbd-i2c.h

index 29d439742653d0ab81006f575f47c6b29c31bab8..27ae8bbfb4777b4909afdd48e839c33359b39c93 100644 (file)
@@ -47,7 +47,7 @@
 #include <linux/i2c-id.h>
 #include <linux/workqueue.h>
 
-#include <media/ir-common.h>
+#include <media/ir-core.h>
 #include <media/ir-kbd-i2c.h>
 
 /* ----------------------------------------------------------------------- */
@@ -272,11 +272,8 @@ static void ir_key_poll(struct IR_i2c *ir)
                return;
        }
 
-       if (0 == rc) {
-               ir_input_nokey(ir->input, &ir->ir);
-       } else {
-               ir_input_keydown(ir->input, &ir->ir, ir_key);
-       }
+       if (rc)
+               ir_keydown(ir->input, ir_key, 0);
 }
 
 static void ir_work(struct work_struct *work)
@@ -439,10 +436,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);
-       if (err < 0)
-               goto err_out_free;
-
+       ir->ir_type = ir_type;
        input_dev->id.bustype = BUS_I2C;
        input_dev->name       = ir->name;
        input_dev->phys       = ir->phys;
index 0506e45c9a4f787a3b082777491c3389935bffc3..5e96d7a430be8a2ce6327b72aa1b09e17f9b306f 100644 (file)
@@ -11,7 +11,7 @@ struct IR_i2c {
        struct i2c_client      *c;
        struct input_dev       *input;
        struct ir_input_state  ir;
-
+       u64                    ir_type;
        /* Used to avoid fast repeating */
        unsigned char          old;