Skip to contentSkip to conversation

V4L/DVB: cx88: Move I2C IR initialization

PATCH New Jean Delvare 1 participant 1 message Jun 28, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 V4L/DVB: cx88: Move I2C IR initialization

Move I2C IR initialization from just after I2C bus setup to right before non-I2C IR initialization. This is the same as was done for the bttv driver several months ago. Might solve bugs which have not yet been reported for some cards. It makes both drivers consistent, and makes it easier to disable IR support (coming soon.)

---
 drivers/media/video/cx88/cx88-cards.c |    1 +
 drivers/media/video/cx88/cx88-i2c.c   |    6 +++++-
 drivers/media/video/cx88/cx88.h       |    1 +
 3 files changed, 7 insertions(+), 1 deletion(-)
drivers/media/video/cx88/cx88-cards.c +1 -0
@@ -3498,6 +3498,7 @@ struct cx88_core *cx88_core_create(struc
 	}
 
 	cx88_card_setup(core);
+	cx88_i2c_init_ir(core);
 	cx88_ir_init(core, pci);
 
 	return core;
drivers/media/video/cx88/cx88-i2c.c +5 -1
@@ -181,6 +181,11 @@ int cx88_i2c_init(struct cx88_core *core
 	} else
 		printk("%s: i2c register FAILED\n", core->name);
 
+	return core->i2c_rc;
+}
+
+void cx88_i2c_init_ir(struct cx88_core *core)
+{
 	/* Instantiate the IR receiver device, if present */
 	if (0 == core->i2c_rc) {
 		struct i2c_board_info info;
@@ -196,7 +201,6 @@ int cx88_i2c_init(struct cx88_core *core
 		i2c_new_probed_device(&core->i2c_adap, &info, addr_list,
 				      i2c_probe_func_quick_read);
 	}
-	return core->i2c_rc;
 }
 
 /* ----------------------------------------------------------------------- */
drivers/media/video/cx88/cx88.h +1 -0
@@ -636,6 +636,7 @@ extern struct videobuf_queue_ops cx8800_
 /* cx88-i2c.c                                                  */
 
 extern int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci);
+extern void cx88_i2c_init_ir(struct cx88_core *core);
 
 
 /* ----------------------------------------------------------- */
Signature · 1 line
Jean Delvare