[media] media: mx3_camera: Improve data bus width check code for probe
authorLiu Ying <Ying.liu@freescale.com>
Mon, 6 Aug 2012 06:02:08 +0000 (03:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 15 Aug 2012 23:05:25 +0000 (20:05 -0300)
This patch contains code change only to use the present macro-
MX3_CAMERA_DATAWIDTH_MASK to check valid camera platform data
bus width instead of enumerating every possible data bus width.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/mx3_camera.c

index af2297d..16975c6 100644 (file)
@@ -1171,9 +1171,7 @@ static int __devinit mx3_camera_probe(struct platform_device *pdev)
 
        mx3_cam->pdata = pdev->dev.platform_data;
        mx3_cam->platform_flags = mx3_cam->pdata->flags;
-       if (!(mx3_cam->platform_flags & (MX3_CAMERA_DATAWIDTH_4 |
-                       MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10 |
-                       MX3_CAMERA_DATAWIDTH_15))) {
+       if (!(mx3_cam->platform_flags & MX3_CAMERA_DATAWIDTH_MASK)) {
                /*
                 * Platform hasn't set available data widths. This is bad.
                 * Warn and use a default.