Em Fri, 28 Dec 2012 00:02:46 +0100 Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx> escreveu: > Module "ir-kbd-i2c" already provides this function as IR_KBD_GET_KEY_KNC1. See my comment for patch 6/6. Regards, Mauro > > Signed-off-by: Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx> > --- > drivers/media/usb/em28xx/em28xx-input.c | 30 +----------------------------- > 1 Datei geändert, 1 Zeile hinzugefügt(+), 29 Zeilen entfernt(-) > > diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c > index 631e252..62b6cb7 100644 > --- a/drivers/media/usb/em28xx/em28xx-input.c > +++ b/drivers/media/usb/em28xx/em28xx-input.c > @@ -85,34 +85,6 @@ struct em28xx_IR { > I2C IR based get keycodes - should be used with ir-kbd-i2c > **********************************************************/ > > -static int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) > -{ > - unsigned char b; > - > - /* poll IR chip */ > - if (1 != i2c_master_recv(ir->c, &b, 1)) { > - i2cdprintk("read error\n"); > - return -EIO; > - } > - > - /* it seems that 0xFE indicates that a button is still hold > - down, while 0xff indicates that no button is hold > - down. 0xfe sequences are sometimes interrupted by 0xFF */ > - > - i2cdprintk("key %02x\n", b); > - > - if (b == 0xff) > - return 0; > - > - if (b == 0xfe) > - /* keep old data */ > - return 1; > - > - *ir_key = b; > - *ir_raw = b; > - return 1; > -} > - > static int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) > { > unsigned char buf[2]; > @@ -476,7 +448,7 @@ static int em28xx_register_i2c_ir(struct em28xx *dev, struct rc_dev *rc_dev) > case EM2820_BOARD_TERRATEC_CINERGY_250: > dev->init_data.name = "i2c IR (EM28XX Terratec)"; > dev->init_data.type = RC_BIT_OTHER; > - dev->init_data.get_key = em28xx_get_key_terratec; > + dev->init_data.internal_get_key_func = IR_KBD_GET_KEY_KNC1; > break; > case EM2820_BOARD_PINNACLE_USB_2: > dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)"; -- Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html