Before extending the special pixel format handling turn the multiple if
statements into a switch.
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
 {
        int i;
 
-       if (vin->info->model == RCAR_M1 && pixelformat == V4L2_PIX_FMT_XBGR32)
-               return NULL;
-
-       if (pixelformat == V4L2_PIX_FMT_NV12 && !vin->info->nv12)
-               return NULL;
+       switch (pixelformat) {
+       case V4L2_PIX_FMT_XBGR32:
+               if (vin->info->model == RCAR_M1)
+                       return NULL;
+               break;
+       case V4L2_PIX_FMT_NV12:
+               if (!vin->info->nv12)
+                       return NULL;
+               break;
+       default:
+               break;
+       }
 
        for (i = 0; i < ARRAY_SIZE(rvin_formats); i++)
                if (rvin_formats[i].fourcc == pixelformat)