Commit c4ede4ce authored by Liu Ying's avatar Liu Ying Committed by Mauro Carvalho Chehab

[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: default avatarLiu Ying <Ying.Liu@freescale.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c078ac18
...@@ -1171,9 +1171,7 @@ static int __devinit mx3_camera_probe(struct platform_device *pdev) ...@@ -1171,9 +1171,7 @@ static int __devinit mx3_camera_probe(struct platform_device *pdev)
mx3_cam->pdata = pdev->dev.platform_data; mx3_cam->pdata = pdev->dev.platform_data;
mx3_cam->platform_flags = mx3_cam->pdata->flags; mx3_cam->platform_flags = mx3_cam->pdata->flags;
if (!(mx3_cam->platform_flags & (MX3_CAMERA_DATAWIDTH_4 | if (!(mx3_cam->platform_flags & MX3_CAMERA_DATAWIDTH_MASK)) {
MX3_CAMERA_DATAWIDTH_8 | MX3_CAMERA_DATAWIDTH_10 |
MX3_CAMERA_DATAWIDTH_15))) {
/* /*
* Platform hasn't set available data widths. This is bad. * Platform hasn't set available data widths. This is bad.
* Warn and use a default. * Warn and use a default.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment