From c4ede4cedad1163345a2c2b4abc7e2208034190e Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Mon, 6 Aug 2012 03:02:08 -0300 Subject: [PATCH] [media] media: mx3_camera: Improve data bus width check code for probe 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 Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mx3_camera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/mx3_camera.c b/drivers/media/platform/mx3_camera.c index af2297d..16975c6 100644 --- a/drivers/media/platform/mx3_camera.c +++ b/drivers/media/platform/mx3_camera.c @@ -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. -- 2.7.4