dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/media/IR
Jarod Wilson 083e472176 V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET
On Tue, May 04, 2010 at 06:06:41PM +0200, Dan Carpenter wrote:
> On Tue, May 04, 2010 at 10:03:18AM -0400, Jarod Wilson wrote:
> > @@ -1205,7 +1204,7 @@ static u32 imon_panel_key_lookup(u64 hw_code)
> >  		if (imon_panel_key_table[i].hw_code == (code | 0xffee))
> >  			break;
> >
> > -	keycode = imon_panel_key_table[i % IMON_KEY_RELEASE_OFFSET].keycode;
> > +	keycode = imon_panel_key_table[i].keycode;
> >
> >  	return keycode;
> >  }
>
> There is still potentially a problem here because if we don't hit the
> break statement, then we're one past the end of the array.

D'oh. Okay, here's v2, should fix that buglet too.

This hack was used when the imon driver was using internal key lookup
routines, but became dead weight when the driver was converted to use
ir-core's key lookup routines. These bits simply didn't get removed,
drop 'em now.

Pointed out by Dan Carpenter.

v2: fix possible attempt to access beyond end of key table array,
also pointed out by Dan.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:17 -03:00
..
keymaps V4L/DVB: IR/imon: convert to ir-core protocol change handling 2010-05-19 12:58:24 -03:00
Kconfig V4L/DVB: ir-core: Add Sony support to ir-core 2010-05-19 12:57:44 -03:00
Makefile V4L/DVB: ir-core: Add Sony support to ir-core 2010-05-19 12:57:44 -03:00
imon.c V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET 2010-05-19 12:59:17 -03:00
ir-core-priv.h V4L/DVB: ir-core: Add Sony support to ir-core 2010-05-19 12:57:44 -03:00
ir-functions.c V4L/DVB: ir-core: move subsystem internal calls to ir-core-priv.h 2010-05-19 12:57:04 -03:00
ir-jvc-decoder.c V4L/DVB: ir-core: Add JVC support to ir-core 2010-05-19 12:57:43 -03:00
ir-keytable.c V4L/DVB: ir-core: fix some confusing comments 2010-05-19 12:57:47 -03:00
ir-nec-decoder.c V4L/DVB: ir-core: change duration to be coded as a u32 integer 2010-05-19 12:57:42 -03:00
ir-raw-event.c V4L/DVB: ir-core: Add Sony support to ir-core 2010-05-19 12:57:44 -03:00
ir-rc5-decoder.c V4L/DVB: ir-core: change duration to be coded as a u32 integer 2010-05-19 12:57:42 -03:00
ir-rc6-decoder.c V4L/DVB: ir-core: change duration to be coded as a u32 integer 2010-05-19 12:57:42 -03:00
ir-sony-decoder.c V4L/DVB: ir-core: Add Sony support to ir-core 2010-05-19 12:57:44 -03:00
ir-sysfs.c V4L/DVB: ir-core: remove IR_TYPE_PD 2010-05-19 12:58:25 -03:00
rc-map.c V4L/DVB: media/IR: Add missing include file to rc-map.c 2010-05-19 12:59:12 -03:00