public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: mchehab@redhat.com
Cc: linux-media@vger.kernel.org
Subject: [PATCH 4/8] ir-core: partially convert ir-kbd-i2c.c to not use ir-functions.c
Date: Mon, 07 Jun 2010 21:32:33 +0200	[thread overview]
Message-ID: <20100607193233.21236.11164.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100607192830.21236.69701.stgit@localhost.localdomain>

Partially convert drivers/media/video/ir-kbd-i2c.c to
not use ir-functions.c

Signed-off-by: David Härdeman <david@hardeman.nu>
---
 drivers/media/video/ir-kbd-i2c.c |   14 ++++----------
 include/media/ir-kbd-i2c.h       |    2 +-
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 29d4397..27ae8bb 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -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;
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h
index 0506e45..5e96d7a 100644
--- a/include/media/ir-kbd-i2c.h
+++ b/include/media/ir-kbd-i2c.h
@@ -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;
 


  parent reply	other threads:[~2010-06-07 19:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 19:32 [PATCH 0/8] rc-core cleanups David Härdeman
2010-06-07 19:32 ` [PATCH 1/8] ir-core: convert mantis to not use ir-functions.c David Härdeman
2010-06-07 19:32 ` [PATCH 2/8] ir-core: convert em28xx " David Härdeman
2010-06-27 10:23   ` Mauro Carvalho Chehab
2010-06-27 11:19     ` Mauro Carvalho Chehab
2010-06-07 19:32 ` [PATCH 3/8] ir-core: partially convert cx88 " David Härdeman
2010-06-07 19:32 ` David Härdeman [this message]
2010-06-07 19:32 ` [PATCH 5/8] ir-core: partially convert bt8xx " David Härdeman
2010-06-27 12:11   ` Mauro Carvalho Chehab
2010-06-27 15:14     ` Andy Walls
2010-06-28  1:26       ` Mauro Carvalho Chehab
2010-06-27 20:17     ` Jarod Wilson
2010-06-27 21:37       ` Andy Walls
2010-06-27 23:17       ` MCEUSB memory leak and how to tell if ir_register_input() failure registered input_dev? Andy Walls
2010-06-28  3:34         ` Jarod Wilson
2010-07-03 13:20           ` Andy Walls
2010-06-07 19:32 ` [PATCH 6/8] ir-core: centralize sysfs raw decoder enabling/disabling David Härdeman
2010-06-07 19:32 ` [PATCH 7/8] ir-core: move decoding state to ir_raw_event_ctrl David Härdeman
2010-06-07 19:32 ` [PATCH 8/8] ir-core: merge rc-map.h into ir-core.h David Härdeman
2010-06-28 17:45   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100607193233.21236.11164.stgit@localhost.localdomain \
    --to=david@hardeman.nu \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox