linux/drivers/media
James Hogan df1caa587a [media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo
Raw IR events are passed to the raw event thread through a kfifo. The
size of the event struct is 12 bytes, and space for 512 events is
reserved in the kfifo (6144 bytes), however this is rounded down to 4096
bytes (the next power of 2) by __kfifo_alloc().

4096 bytes is not divisible by 12 therefore if the fifo fills up a third
of a record will be written in the end of the kfifo by
ir_raw_event_store() because the recsize of the fifo is 0 (it doesn't
have records). When this is read by ir_raw_event_thread() a corrupted or
partial record will be read, and in the case of a partial record the
BUG_ON(retval != sizeof(ev)) gets hit too.

According to samples/kfifo/record-example.c struct kfifo_rec_ptr_1 can
handle records of a length between 0 and 255 bytes, so change struct
ir_raw_event_ctrl to use that instead of struct kfifo.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:39:53 -03:00
..
common [media] mt2063: remove mt2063_setTune from header 2012-02-28 18:12:51 -03:00
dvb [media] lgdt330x: fix signedness error in i2c_read_demod_bytes() 2012-03-08 09:01:12 -03:00
radio [media] [trivial]: Fix typo in radio-sf16fmr2.c 2012-03-08 09:00:30 -03:00
rc [media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo 2012-03-08 10:39:53 -03:00
video [media] media: i.MX27 camera: Add resizing support 2012-03-08 10:06:44 -03:00
Kconfig [media] DVB: dvb-net, make the kconfig text helpful 2011-07-27 17:53:09 -03:00
Makefile [media] media: Entities, pads and links 2011-03-22 04:53:10 -03:00
media-device.c [media] media: fix truncated entity specification 2011-12-20 09:31:50 -02:00
media-devnode.c [media] media: Fix media device minor registration 2011-06-01 13:24:23 -03:00
media-entity.c [media] media: Properly handle link flags in link setup, link notify callback 2011-04-17 07:43:32 -03:00