summaryrefslogtreecommitdiffstats
path: root/drivers/media/spi
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-19 14:39:49 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-19 14:39:49 -0300
commit3c3ba5452e8a0e2dd9fb89222feb88f11ec6ff7a (patch)
tree244237952fc0525afb9693e1d869b1d04ff33b0e /drivers/media/spi
parent8283a0929922b331dbd73db26520443136941c48 (diff)
downloadlinux-stable-3c3ba5452e8a0e2dd9fb89222feb88f11ec6ff7a.tar.gz
linux-stable-3c3ba5452e8a0e2dd9fb89222feb88f11ec6ff7a.tar.bz2
linux-stable-3c3ba5452e8a0e2dd9fb89222feb88f11ec6ff7a.zip
[media] gs1662: make checkpatch happy
WARNING: line over 80 characters + GS_HEIGHT_MAX, GS_PIXELCLOCK_MIN, GS_PIXELCLOCK_MAX, WARNING: line over 80 characters + if (v4l2_match_dv_timings(timings, &reg_fmt[i].format, 0, false)) WARNING: Block comments use a trailing */ on a separate line + * which looks like a video signal activity.*/ WARNING: else is not generally useful after a break or return + return gs_write_register(gs->pdev, REG_FORCE_FMT, reg_value); + } else { WARNING: Block comments use a trailing */ on a separate line + * which looks like a video signal activity.*/ ERROR: spaces required around that '=' (ctx:VxW) + .enum_dv_timings= gs_enum_dv_timings, ^ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/spi')
-rw-r--r--drivers/media/spi/gs1662.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c
index f74342339e5a..d76f36233f43 100644
--- a/drivers/media/spi/gs1662.c
+++ b/drivers/media/spi/gs1662.c
@@ -134,7 +134,8 @@ static const struct v4l2_dv_timings_cap gs_timings_cap = {
/* keep this initialization for compatibility with GCC < 4.4.6 */
.reserved = { 0 },
V4L2_INIT_BT_TIMINGS(GS_WIDTH_MIN, GS_WIDTH_MAX, GS_HEIGHT_MIN,
- GS_HEIGHT_MAX, GS_PIXELCLOCK_MIN, GS_PIXELCLOCK_MAX,
+ GS_HEIGHT_MAX, GS_PIXELCLOCK_MIN,
+ GS_PIXELCLOCK_MAX,
V4L2_DV_BT_STD_CEA861 | V4L2_DV_BT_STD_SDI,
V4L2_DV_BT_CAP_PROGRESSIVE
| V4L2_DV_BT_CAP_INTERLACED)
@@ -237,7 +238,8 @@ static u16 get_register_timings(struct v4l2_dv_timings *timings)
int i;
for (i = 0; i < ARRAY_SIZE(reg_fmt); i++) {
- if (v4l2_match_dv_timings(timings, &reg_fmt[i].format, 0, false))
+ if (v4l2_match_dv_timings(timings, &reg_fmt[i].format, 0,
+ false))
return reg_fmt[i].reg_value | MASK_FORCE_STD;
}
@@ -283,8 +285,10 @@ static int gs_query_dv_timings(struct v4l2_subdev *sd,
if (gs->enabled)
return -EBUSY;
- /* Check if the component detect a line, a frame or something else
- * which looks like a video signal activity.*/
+ /*
+ * Check if the component detect a line, a frame or something else
+ * which looks like a video signal activity.
+ */
for (i = 0; i < 4; i++) {
gs_read_register(gs->pdev, REG_LINES_PER_FRAME + i, &reg_value);
if (reg_value)
@@ -337,10 +341,10 @@ static int gs_s_stream(struct v4l2_subdev *sd, int enable)
/* To force the specific format */
reg_value = get_register_timings(&gs->current_timings);
return gs_write_register(gs->pdev, REG_FORCE_FMT, reg_value);
- } else {
- /* To renable auto-detection mode */
- return gs_write_register(gs->pdev, REG_FORCE_FMT, 0x0);
}
+
+ /* To renable auto-detection mode */
+ return gs_write_register(gs->pdev, REG_FORCE_FMT, 0x0);
}
static int gs_g_input_status(struct v4l2_subdev *sd, u32 *status)
@@ -349,8 +353,10 @@ static int gs_g_input_status(struct v4l2_subdev *sd, u32 *status)
u16 reg_value, i;
int ret;
- /* Check if the component detect a line, a frame or something else
- * which looks like a video signal activity.*/
+ /*
+ * Check if the component detect a line, a frame or something else
+ * which looks like a video signal activity.
+ */
for (i = 0; i < 4; i++) {
ret = gs_read_register(gs->pdev,
REG_LINES_PER_FRAME + i, &reg_value);
@@ -404,7 +410,7 @@ static const struct v4l2_subdev_video_ops gs_video_ops = {
};
static const struct v4l2_subdev_pad_ops gs_pad_ops = {
- .enum_dv_timings= gs_enum_dv_timings,
+ .enum_dv_timings = gs_enum_dv_timings,
.dv_timings_cap = gs_dv_timings_cap,
};