]> Pileus Git - ~andy/linux/commit
[media] media: coda: keep track of active instances
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 25 Jul 2012 12:16:58 +0000 (09:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 26 Sep 2012 19:36:57 +0000 (16:36 -0300)
commite11f3e6ef64726c64dae435f7059715adf5de2ff
treebf7cc6d55810ea550c1e0c75584d871f651b8c88
parentbcedb4c2422801e37c3d9c716597e8883d1b4e87
[media] media: coda: keep track of active instances

Determining the next free instance just by incrementing and decrementing
an instance counter does not work: if there are two instances opened,
0 and 1, and instance 0 is released, the next call to coda_open will
create a new instance with index 1, but instance 1 is already in use.
Instead, scan a bitfield of active instances to determine the first
free instance index.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/coda.c