[media] media/vivid: Code cleanout
authorRicardo Ribalda <ricardo.ribalda@gmail.com>
Mon, 4 May 2015 08:07:32 +0000 (05:07 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 18 May 2015 19:27:28 +0000 (16:27 -0300)
Remove code duplication by merging two cases in a switch.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/vivid-tpg.c

index 9e50303a19c531f679d8714002f6f29980b4210d..af4bc97800992b9dfa87bb9ab75c12edc22b8673 100644 (file)
@@ -293,6 +293,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
        }
 
        switch (fourcc) {
+       case V4L2_PIX_FMT_GREY:
        case V4L2_PIX_FMT_RGB332:
                tpg->twopixelsize[0] = 2;
                break;
@@ -331,9 +332,6 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
        case V4L2_PIX_FMT_YUV32:
                tpg->twopixelsize[0] = 2 * 4;
                break;
-       case V4L2_PIX_FMT_GREY:
-               tpg->twopixelsize[0] = 2;
-               break;
        case V4L2_PIX_FMT_NV12:
        case V4L2_PIX_FMT_NV21:
        case V4L2_PIX_FMT_NV12M: