[media] v4l: omap4iss: Move common code out of switch...case
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 3 Nov 2013 23:17:51 +0000 (20:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 3 Dec 2013 19:45:51 +0000 (17:45 -0200)
Code common to all cases can be moved out of the switch...case
statement.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/omap4iss/iss.c

index 1a5cac9..243fcb8 100644 (file)
@@ -178,12 +178,10 @@ void omap4iss_configure_bridge(struct iss_device *iss,
        switch (input) {
        case IPIPEIF_INPUT_CSI2A:
                issctrl_val |= ISS_CTRL_INPUT_SEL_CSI2A;
-               isp5ctrl_val |= ISP5_CTRL_VD_PULSE_EXT;
                break;
 
        case IPIPEIF_INPUT_CSI2B:
                issctrl_val |= ISS_CTRL_INPUT_SEL_CSI2B;
-               isp5ctrl_val |= ISP5_CTRL_VD_PULSE_EXT;
                break;
 
        default:
@@ -192,7 +190,8 @@ void omap4iss_configure_bridge(struct iss_device *iss,
 
        issctrl_val |= ISS_CTRL_SYNC_DETECT_VS_RAISING;
 
-       isp5ctrl_val |= ISP5_CTRL_PSYNC_CLK_SEL | ISP5_CTRL_SYNC_ENABLE;
+       isp5ctrl_val |= ISP5_CTRL_VD_PULSE_EXT | ISP5_CTRL_PSYNC_CLK_SEL |
+                       ISP5_CTRL_SYNC_ENABLE;
 
        writel(issctrl_val, iss->regs[OMAP4_ISS_MEM_TOP] + ISS_CTRL);
        writel(isp5ctrl_val, iss->regs[OMAP4_ISS_MEM_ISP_SYS1] + ISP5_CTRL);