[media] V4L: soc-camera: avoid huge arrays, caused by changed format codes
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Fri, 13 May 2011 16:21:36 +0000 (13:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 15:04:22 +0000 (12:04 -0300)
commit93f116d595e9aa7dca5f6507376d6995f217d420
tree683617d71b12678ed976cc5c2eaa7a2e5bcb9d11
parentee1b6f4bf3aa827b0daf65d7441e75212604b1c9
[media] V4L: soc-camera: avoid huge arrays, caused by changed format codes

Recently mediabus pixel format codes have become a part of the user-
space API, at which time their values also have been changed from
contiguous numbers, running from 0 to sparse numbers with values
around 0x1000, 0x2000, 0x3000... This made them unsuitable for the
use as array indices. This patch switches soc-camera internal format
look-ups to not depend on values of those macros.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/soc_mediabus.c
include/media/soc_mediabus.h