aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index b2aed29e2d7..edba71115a9 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1912,13 +1912,23 @@ static int em28xx_hint_board(struct em28xx *dev)
1912} 1912}
1913 1913
1914/* ----------------------------------------------------------------------- */ 1914/* ----------------------------------------------------------------------- */
1915void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir) 1915void em28xx_register_i2c_ir(struct em28xx *dev)
1916{ 1916{
1917 if (disable_ir) { 1917 struct i2c_board_info info;
1918 ir->get_key = NULL; 1918 const unsigned short addr_list[] = {
1919 return ; 1919 0x30, 0x47, I2C_CLIENT_END
1920 } 1920 };
1921
1922 if (disable_ir)
1923 return;
1921 1924
1925 memset(&info, 0, sizeof(struct i2c_board_info));
1926 strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
1927 i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
1928}
1929
1930void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir)
1931{
1922 /* detect & configure */ 1932 /* detect & configure */
1923 switch (dev->model) { 1933 switch (dev->model) {
1924 case (EM2800_BOARD_UNKNOWN): 1934 case (EM2800_BOARD_UNKNOWN):