[PATCH 2/2] drivers: staging: media: atomisp: fix coding style warnings

2017-05-07 Thread Avraham Shukron
Fix for warnings reported by checkpatch.pl:
 - Multiline comment style
 - Bare "unsigned"
 - Missing blank line after declarations
 - Un-needed braces around single-statement branch

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 .../platform/intel-mid/atomisp_gmin_platform.c | 45 ++
 .../platform/intel-mid/intel_mid_pcihelpers.c  |  9 +++--
 2 files changed, 35 insertions(+), 19 deletions(-)

diff --git 
a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c 
b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
index 7ebefb3..fac03a0 100644
--- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
@@ -119,7 +119,7 @@ static int af_power_ctrl(struct v4l2_subdev *subdev, int 
flag)
/*
 * The power here is used for dw9817,
 * regulator is from rear sensor
-   */
+*/
if (gs->v2p8_vcm_reg) {
if (flag)
return regulator_enable(gs->v2p8_vcm_reg);
@@ -167,7 +167,8 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
 * uses ACPI runtime power management for camera devices, but
 * we don't.  Disable it, or else the rails will be needlessly
 * tickled during suspend/resume.  This has caused power and
-* performance issues on multiple devices. */
+* performance issues on multiple devices.
+*/
adev = ACPI_COMPANION(>dev);
if (adev)
adev->power.flags.power_resources = 0;
@@ -182,7 +183,8 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
/* Note subtlety of initialization order: at the point where
 * this registration API gets called, the platform data
 * callbacks have probably already been invoked, so the
-* gmin_subdev struct is already initialized for us. */
+* gmin_subdev struct is already initialized for us.
+*/
gs = find_gmin_subdev(subdev);
 
pdata.subdevs[i].type = type;
@@ -206,8 +208,10 @@ struct v4l2_subdev *atomisp_gmin_find_subdev(struct 
i2c_adapter *adapter,
 struct i2c_board_info *board_info)
 {
int i;
+
for (i = 0; i < MAX_SUBDEVS && pdata.subdevs[i].type; i++) {
struct intel_v4l2_subdev_table *sd = [i];
+
if (sd->v4l2_subdev.i2c_adapter_id == adapter->nr &&
sd->v4l2_subdev.board_info.addr == board_info->addr)
return sd->subdev;
@@ -261,7 +265,8 @@ static const struct gmin_cfg_var ffrd8_vars[] = {
 };
 
 /* Cribbed from MCG defaults in the mt9m114 driver, not actually verified
- * vs. T100 hardware */
+ * vs. T100 hardware
+ */
 static const struct gmin_cfg_var t100_vars[] = {
{ "INT33F0:00_CsiPort",  "0" },
{ "INT33F0:00_CsiLanes", "1" },
@@ -345,10 +350,8 @@ static struct gmin_subdev *gmin_subdev_add(struct 
v4l2_subdev *subdev)
struct device *dev;
struct i2c_client *client = v4l2_get_subdevdata(subdev);
 
-   if (!pmic_id) {
-
-   pmic_id = PMIC_REGULATOR;
-   }
+   if (!pmic_id)
+   pmic_id = PMIC_REGULATOR;
 
if (!client)
return NULL;
@@ -401,7 +404,8 @@ static struct gmin_subdev *gmin_subdev_add(struct 
v4l2_subdev *subdev)
 * API is broken with the current drivers, returning
 * "1" for a regulator that will then emit a
 * "unbalanced disable" WARNing if we try to disable
-* it. */
+* it.
+*/
}
 
return _subdevs[i];
@@ -410,6 +414,7 @@ static struct gmin_subdev *gmin_subdev_add(struct 
v4l2_subdev *subdev)
 static struct gmin_subdev *find_gmin_subdev(struct v4l2_subdev *subdev)
 {
int i;
+
for (i = 0; i < MAX_SUBDEVS; i++)
if (gmin_subdevs[i].subdev == subdev)
return _subdevs[i];
@@ -419,6 +424,7 @@ static struct gmin_subdev *find_gmin_subdev(struct 
v4l2_subdev *subdev)
 static int gmin_gpio0_ctrl(struct v4l2_subdev *subdev, int on)
 {
struct gmin_subdev *gs = find_gmin_subdev(subdev);
+
if (gs && gs->gpio0) {
gpiod_set_value(gs->gpio0, on);
return 0;
@@ -429,6 +435,7 @@ static int gmin_gpio0_ctrl(struct v4l2_subdev *subdev, int 
on)
 static int gmin_gpio1_ctrl(struct v4l2_subdev *subdev, int on)
 {
struct gmin_subdev *gs = find_gmin_subdev(subdev);
+
if (gs && gs->gpio1) {
gpiod_set_value(gs->gpio1, on);
return 0;
@@ -531,6 +538,7 @@ int gmin_flisclk_ctrl(struct v4l2_subdev *subdev, int on)
 {
int ret = 0;

[PATCH 1/2] drivers: staging: media: atomisp: fixed coding style errors

2017-05-07 Thread Avraham Shukron
Fix for error (not warnings) reported by checkpatch.pl
Specifically:
 - missing whitespace around "=" and after ","
 - indentation with spaces instead of tabs
 - lines starting with a whitespace

This patch does not affect the compiled code in any way.

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 .../platform/intel-mid/atomisp_gmin_platform.c | 156 ++---
 .../platform/intel-mid/intel_mid_pcihelpers.c  |   2 +-
 2 files changed, 79 insertions(+), 79 deletions(-)

diff --git 
a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c 
b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
index 5b4506a..7ebefb3 100644
--- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
@@ -51,7 +51,7 @@ struct gmin_subdev {
 
 static struct gmin_subdev gmin_subdevs[MAX_SUBDEVS];
 
-static enum { PMIC_UNSET = 0, PMIC_REGULATOR, PMIC_AXP, PMIC_TI ,
+static enum { PMIC_UNSET = 0, PMIC_REGULATOR, PMIC_AXP, PMIC_TI,
PMIC_CRYSTALCOVE } pmic_id;
 
 /* The atomisp uses type==0 for the end-of-list marker, so leave space. */
@@ -152,13 +152,13 @@ const struct camera_af_platform_data 
*camera_get_af_platform_data(void)
 EXPORT_SYMBOL_GPL(camera_get_af_platform_data);
 
 int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
-struct camera_sensor_platform_data *plat_data,
-enum intel_v4l2_subdev_type type)
+   struct camera_sensor_platform_data *plat_data,
+   enum intel_v4l2_subdev_type type)
 {
int i;
struct i2c_board_info *bi;
struct gmin_subdev *gs;
-struct i2c_client *client = v4l2_get_subdevdata(subdev);
+   struct i2c_client *client = v4l2_get_subdevdata(subdev);
struct acpi_device *adev;
 
dev_info(>dev, "register atomisp i2c module type %d\n", type);
@@ -172,7 +172,7 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
if (adev)
adev->power.flags.power_resources = 0;
 
-   for (i=0; i < MAX_SUBDEVS; i++)
+   for (i = 0; i < MAX_SUBDEVS; i++)
if (!pdata.subdevs[i].type)
break;
 
@@ -206,7 +206,7 @@ struct v4l2_subdev *atomisp_gmin_find_subdev(struct 
i2c_adapter *adapter,
 struct i2c_board_info *board_info)
 {
int i;
-   for (i=0; i < MAX_SUBDEVS && pdata.subdevs[i].type; i++) {
+   for (i = 0; i < MAX_SUBDEVS && pdata.subdevs[i].type; i++) {
struct intel_v4l2_subdev_table *sd = [i];
if (sd->v4l2_subdev.i2c_adapter_id == adapter->nr &&
sd->v4l2_subdev.board_info.addr == board_info->addr)
@@ -270,45 +270,45 @@ static const struct gmin_cfg_var t100_vars[] = {
 };
 
 static const struct gmin_cfg_var mrd7_vars[] = {
-{"INT33F8:00_CamType", "1"},
-{"INT33F8:00_CsiPort", "1"},
-{"INT33F8:00_CsiLanes","2"},
-{"INT33F8:00_CsiFmt","13"},
-{"INT33F8:00_CsiBayer", "0"},
-{"INT33F8:00_CamClk", "0"},
-{"INT33F9:00_CamType", "1"},
-{"INT33F9:00_CsiPort", "0"},
-{"INT33F9:00_CsiLanes","1"},
-{"INT33F9:00_CsiFmt","13"},
-{"INT33F9:00_CsiBayer", "0"},
-{"INT33F9:00_CamClk", "1"},
-{},
+   {"INT33F8:00_CamType", "1"},
+   {"INT33F8:00_CsiPort", "1"},
+   {"INT33F8:00_CsiLanes", "2"},
+   {"INT33F8:00_CsiFmt", "13"},
+   {"INT33F8:00_CsiBayer", "0"},
+   {"INT33F8:00_CamClk", "0"},
+   {"INT33F9:00_CamType", "1"},
+   {"INT33F9:00_CsiPort", "0"},
+   {"INT33F9:00_CsiLanes", "1"},
+   {"INT33F9:00_CsiFmt", "13"},
+   {"INT33F9:00_CsiBayer", "0"},
+   {"INT33F9:00_CamClk", "1"},
+   {},
 };
 
 static const struct gmin_cfg_var ecs7_vars[] = {
-{"INT33BE:00_CsiPort", "1"},
-{"INT33BE:00_CsiLanes","2"},
-{"INT33BE:00_CsiFmt","13"},
-{"INT33BE:00_CsiBayer", "2"},
-{"INT33BE:00_CamClk", "0"},
-{"INT33F0:00_CsiPort", "0"},
-{"INT33F0:00_CsiLanes","1"},
-{"INT33F0:00_CsiFmt"

[PATCH] staging: media: atomisp: fixed sparse warnings

2017-05-05 Thread Avraham Shukron
Added "static" storage class to 4 not-declared functions

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c 
b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
index 5b4506a..15409e9 100644
--- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c
@@ -436,7 +436,7 @@ static int gmin_gpio1_ctrl(struct v4l2_subdev *subdev, int 
on)
return -EINVAL;
 }

-int gmin_v1p2_ctrl(struct v4l2_subdev *subdev, int on)
+static int gmin_v1p2_ctrl(struct v4l2_subdev *subdev, int on)
 {
struct gmin_subdev *gs = find_gmin_subdev(subdev);

@@ -455,7 +455,8 @@ int gmin_v1p2_ctrl(struct v4l2_subdev *subdev, int on)

return -EINVAL;
 }
-int gmin_v1p8_ctrl(struct v4l2_subdev *subdev, int on)
+
+static int gmin_v1p8_ctrl(struct v4l2_subdev *subdev, int on)
 {
struct gmin_subdev *gs = find_gmin_subdev(subdev);
int ret;
@@ -491,7 +492,7 @@ int gmin_v1p8_ctrl(struct v4l2_subdev *subdev, int on)
return -EINVAL;
 }

-int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, int on)
+static int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, int on)
 {
struct gmin_subdev *gs = find_gmin_subdev(subdev);
int ret;
@@ -527,7 +528,7 @@ int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, int on)
return -EINVAL;
 }

-int gmin_flisclk_ctrl(struct v4l2_subdev *subdev, int on)
+static int gmin_flisclk_ctrl(struct v4l2_subdev *subdev, int on)
 {
int ret = 0;
struct gmin_subdev *gs = find_gmin_subdev(subdev);
-- 
2.7.4
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 2/2] staging: omap4iss: fix coding style issue

2017-02-09 Thread Avraham Shukron
Broke argument list so that it won't exceed 80 characters

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 drivers/staging/media/omap4iss/iss_video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c 
b/drivers/staging/media/omap4iss/iss_video.c
index e21811a..0bac582 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -301,7 +301,8 @@ iss_video_check_format(struct iss_video *video, struct 
iss_video_fh *vfh)

 static int iss_video_queue_setup(struct vb2_queue *vq,
 unsigned int *count, unsigned int *num_planes,
-unsigned int sizes[], struct device 
*alloc_devs[])
+unsigned int sizes[],
+struct device *alloc_devs[])
 {
struct iss_video_fh *vfh = vb2_get_drv_priv(vq);
struct iss_video *video = vfh->video;
-- 
2.7.4
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 1/2] staging: omap4iss: fix multiline comment style

2017-02-09 Thread Avraham Shukron
Fixed multi-line comments to their preferred style (First line empty)

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 drivers/staging/media/omap4iss/iss_video.c | 38 --
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c 
b/drivers/staging/media/omap4iss/iss_video.c
index bb0e3b4..e21811a 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -128,7 +128,8 @@ static unsigned int iss_video_mbus_to_pix(const struct 
iss_video *video,
pix->width = mbus->width;
pix->height = mbus->height;

-   /* Skip the last format in the loop so that it will be selected if no
+   /*
+* Skip the last format in the loop so that it will be selected if no
 * match is found.
 */
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
@@ -138,7 +139,8 @@ static unsigned int iss_video_mbus_to_pix(const struct 
iss_video *video,

min_bpl = pix->width * ALIGN(formats[i].bpp, 8) / 8;

-   /* Clamp the requested bytes per line value. If the maximum bytes per
+   /*
+* Clamp the requested bytes per line value. If the maximum bytes per
 * line value is zero, the module doesn't support user configurable line
 * sizes. Override the requested value with the minimum in that case.
 */
@@ -172,7 +174,8 @@ static void iss_video_pix_to_mbus(const struct 
v4l2_pix_format *pix,
mbus->width = pix->width;
mbus->height = pix->height;

-   /* Skip the last format in the loop so that it will be selected if no
+   /*
+* Skip the last format in the loop so that it will be selected if no
 * match is found.
 */
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
@@ -360,7 +363,8 @@ static void iss_video_buf_queue(struct vb2_buffer *vb)

spin_lock_irqsave(>qlock, flags);

-   /* Mark the buffer is faulty and give it back to the queue immediately
+   /*
+* Mark the buffer is faulty and give it back to the queue immediately
 * if the video node has registered an error. vb2 will perform the same
 * check when preparing the buffer, but that is inherently racy, so we
 * need to handle the race condition with an authoritative check here.
@@ -443,7 +447,8 @@ struct iss_buffer *omap4iss_video_buffer_next(struct 
iss_video *video)

buf->vb.vb2_buf.timestamp = ktime_get_ns();

-   /* Do frame number propagation only if this is the output video node.
+   /*
+* Do frame number propagation only if this is the output video node.
 * Frame number either comes from the CSI receivers or it gets
 * incremented here if H3A is not active.
 * Note: There is no guarantee that the output buffer will finish
@@ -605,7 +610,8 @@ iss_video_set_format(struct file *file, void *fh, struct 
v4l2_format *format)

mutex_lock(>mutex);

-   /* Fill the bytesperline and sizeimage fields by converting to media bus
+   /*
+* Fill the bytesperline and sizeimage fields by converting to media bus
 * format and back to pixel format.
 */
iss_video_pix_to_mbus(>fmt.pix, );
@@ -678,8 +684,9 @@ iss_video_get_selection(struct file *file, void *fh, struct 
v4l2_selection *sel)
if (subdev == NULL)
return -EINVAL;

-   /* Try the get selection operation first and fallback to get format if 
not
-* implemented.
+   /*
+* Try the get selection operation first and fallback to get format if
+* not implemented.
 */
sdsel.pad = pad;
ret = v4l2_subdev_call(subdev, pad, get_selection, NULL, );
@@ -867,7 +874,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)

mutex_lock(>stream_lock);

-   /* Start streaming on the pipeline. No link touching an entity in the
+   /*
+* Start streaming on the pipeline. No link touching an entity in the
 * pipeline can be activated or deactivated once streaming is started.
 */
pipe = entity->pipe
@@ -895,7 +903,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
while ((entity = media_graph_walk_next()))
media_entity_enum_set(>ent_enum, entity);

-   /* Verify that the currently configured format matches the output of
+   /*
+* Verify that the currently configured format matches the output of
 * the connected subdev.
 */
ret = iss_video_check_format(video, vfh);
@@ -905,7 +914,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
video->bpl_padding = ret;
video->bpl_value = vfh->format.fmt.pix.bytesperline;

-   /* Find the ISS video node connected at the far end of the pipeline and
+

[PATCH v2] staging: davinci_vpfe: fix multiline comment style

2017-02-08 Thread Avraham Shukron
Aligned asterisks in multi-line comment.

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>

---
 drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c 
b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
index 5fbc2d4..857b0e8 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
@@ -1133,9 +1133,9 @@ void vpfe_resizer_buffer_isr(struct vpfe_resizer_device 
*resizer)
}
} else if (fid == 0) {
/*
-   * out of sync. Recover from any hardware out-of-sync.
-   * May loose one frame
-   */
+* out of sync. Recover from any hardware out-of-sync.
+* May loose one frame
+*/
video_out->field_id = fid;
}
 }
-- 
2.7.4
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: davinci_vpfe: fix multiline comment style

2017-02-08 Thread Avraham Shukron
Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>

---
 drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c 
b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
index 5fbc2d4..857b0e8 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
@@ -1133,9 +1133,9 @@ void vpfe_resizer_buffer_isr(struct vpfe_resizer_device 
*resizer)
}
} else if (fid == 0) {
/*
-   * out of sync. Recover from any hardware out-of-sync.
-   * May loose one frame
-   */
+* out of sync. Recover from any hardware out-of-sync.
+* May loose one frame
+*/
video_out->field_id = fid;
}
 }
-- 
2.7.4
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 2/2] staging: omap4iss: fix coding style issue

2017-02-07 Thread Avraham Shukron
Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 drivers/staging/media/omap4iss/iss_video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c 
b/drivers/staging/media/omap4iss/iss_video.c
index e21811a..0bac582 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -301,7 +301,8 @@ iss_video_check_format(struct iss_video *video, struct 
iss_video_fh *vfh)
 
 static int iss_video_queue_setup(struct vb2_queue *vq,
 unsigned int *count, unsigned int *num_planes,
-unsigned int sizes[], struct device 
*alloc_devs[])
+unsigned int sizes[],
+struct device *alloc_devs[])
 {
struct iss_video_fh *vfh = vb2_get_drv_priv(vq);
struct iss_video *video = vfh->video;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 1/2] staging: omap4iss: fix multiline comment style

2017-02-07 Thread Avraham Shukron
Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>
---
 drivers/staging/media/omap4iss/iss_video.c | 38 --
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c 
b/drivers/staging/media/omap4iss/iss_video.c
index bb0e3b4..e21811a 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -128,7 +128,8 @@ static unsigned int iss_video_mbus_to_pix(const struct 
iss_video *video,
pix->width = mbus->width;
pix->height = mbus->height;
 
-   /* Skip the last format in the loop so that it will be selected if no
+   /*
+* Skip the last format in the loop so that it will be selected if no
 * match is found.
 */
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
@@ -138,7 +139,8 @@ static unsigned int iss_video_mbus_to_pix(const struct 
iss_video *video,
 
min_bpl = pix->width * ALIGN(formats[i].bpp, 8) / 8;
 
-   /* Clamp the requested bytes per line value. If the maximum bytes per
+   /*
+* Clamp the requested bytes per line value. If the maximum bytes per
 * line value is zero, the module doesn't support user configurable line
 * sizes. Override the requested value with the minimum in that case.
 */
@@ -172,7 +174,8 @@ static void iss_video_pix_to_mbus(const struct 
v4l2_pix_format *pix,
mbus->width = pix->width;
mbus->height = pix->height;
 
-   /* Skip the last format in the loop so that it will be selected if no
+   /*
+* Skip the last format in the loop so that it will be selected if no
 * match is found.
 */
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
@@ -360,7 +363,8 @@ static void iss_video_buf_queue(struct vb2_buffer *vb)
 
spin_lock_irqsave(>qlock, flags);
 
-   /* Mark the buffer is faulty and give it back to the queue immediately
+   /*
+* Mark the buffer is faulty and give it back to the queue immediately
 * if the video node has registered an error. vb2 will perform the same
 * check when preparing the buffer, but that is inherently racy, so we
 * need to handle the race condition with an authoritative check here.
@@ -443,7 +447,8 @@ struct iss_buffer *omap4iss_video_buffer_next(struct 
iss_video *video)
 
buf->vb.vb2_buf.timestamp = ktime_get_ns();
 
-   /* Do frame number propagation only if this is the output video node.
+   /*
+* Do frame number propagation only if this is the output video node.
 * Frame number either comes from the CSI receivers or it gets
 * incremented here if H3A is not active.
 * Note: There is no guarantee that the output buffer will finish
@@ -605,7 +610,8 @@ iss_video_set_format(struct file *file, void *fh, struct 
v4l2_format *format)
 
mutex_lock(>mutex);
 
-   /* Fill the bytesperline and sizeimage fields by converting to media bus
+   /*
+* Fill the bytesperline and sizeimage fields by converting to media bus
 * format and back to pixel format.
 */
iss_video_pix_to_mbus(>fmt.pix, );
@@ -678,8 +684,9 @@ iss_video_get_selection(struct file *file, void *fh, struct 
v4l2_selection *sel)
if (subdev == NULL)
return -EINVAL;
 
-   /* Try the get selection operation first and fallback to get format if 
not
-* implemented.
+   /*
+* Try the get selection operation first and fallback to get format if
+* not implemented.
 */
sdsel.pad = pad;
ret = v4l2_subdev_call(subdev, pad, get_selection, NULL, );
@@ -867,7 +874,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
 
mutex_lock(>stream_lock);
 
-   /* Start streaming on the pipeline. No link touching an entity in the
+   /*
+* Start streaming on the pipeline. No link touching an entity in the
 * pipeline can be activated or deactivated once streaming is started.
 */
pipe = entity->pipe
@@ -895,7 +903,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
while ((entity = media_graph_walk_next()))
media_entity_enum_set(>ent_enum, entity);
 
-   /* Verify that the currently configured format matches the output of
+   /*
+* Verify that the currently configured format matches the output of
 * the connected subdev.
 */
ret = iss_video_check_format(video, vfh);
@@ -905,7 +914,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
video->bpl_padding = ret;
video->bpl_value = vfh->format.fmt.pix.bytesperline;
 
-   /* Find the ISS video node connected at the far end of the pipeline and
+   /*
+* Find the ISS video node connec

[PATCH v2] Staging: omap4iss: Fix coding style issues

2017-02-06 Thread Avraham Shukron
Fixes line-over-80-characters issues as well as multiline comments style.

Signed-off-by: Avraham Shukron <avraham.shuk...@gmail.com>

---
 drivers/staging/media/omap4iss/iss_video.c | 41 --
 1 file changed, 27 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c 
b/drivers/staging/media/omap4iss/iss_video.c
index c16927a..42de513 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -128,7 +128,8 @@ static unsigned int iss_video_mbus_to_pix(const struct 
iss_video *video,
pix->width = mbus->width;
pix->height = mbus->height;
 
-   /* Skip the last format in the loop so that it will be selected if no
+   /*
+* Skip the last format in the loop so that it will be selected if no
 * match is found.
 */
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
@@ -138,7 +139,8 @@ static unsigned int iss_video_mbus_to_pix(const struct 
iss_video *video,
 
min_bpl = pix->width * ALIGN(formats[i].bpp, 8) / 8;
 
-   /* Clamp the requested bytes per line value. If the maximum bytes per
+   /*
+* Clamp the requested bytes per line value. If the maximum bytes per
 * line value is zero, the module doesn't support user configurable line
 * sizes. Override the requested value with the minimum in that case.
 */
@@ -172,7 +174,8 @@ static void iss_video_pix_to_mbus(const struct 
v4l2_pix_format *pix,
mbus->width = pix->width;
mbus->height = pix->height;
 
-   /* Skip the last format in the loop so that it will be selected if no
+   /*
+* Skip the last format in the loop so that it will be selected if no
 * match is found.
 */
for (i = 0; i < ARRAY_SIZE(formats) - 1; ++i) {
@@ -298,7 +301,8 @@ iss_video_check_format(struct iss_video *video, struct 
iss_video_fh *vfh)
 
 static int iss_video_queue_setup(struct vb2_queue *vq,
 unsigned int *count, unsigned int *num_planes,
-unsigned int sizes[], struct device 
*alloc_devs[])
+unsigned int sizes[],
+struct device *alloc_devs[])
 {
struct iss_video_fh *vfh = vb2_get_drv_priv(vq);
struct iss_video *video = vfh->video;
@@ -360,7 +364,8 @@ static void iss_video_buf_queue(struct vb2_buffer *vb)
 
spin_lock_irqsave(>qlock, flags);
 
-   /* Mark the buffer is faulty and give it back to the queue immediately
+   /*
+* Mark the buffer is faulty and give it back to the queue immediately
 * if the video node has registered an error. vb2 will perform the same
 * check when preparing the buffer, but that is inherently racy, so we
 * need to handle the race condition with an authoritative check here.
@@ -443,7 +448,8 @@ struct iss_buffer *omap4iss_video_buffer_next(struct 
iss_video *video)
 
buf->vb.vb2_buf.timestamp = ktime_get_ns();
 
-   /* Do frame number propagation only if this is the output video node.
+   /*
+* Do frame number propagation only if this is the output video node.
 * Frame number either comes from the CSI receivers or it gets
 * incremented here if H3A is not active.
 * Note: There is no guarantee that the output buffer will finish
@@ -605,7 +611,8 @@ iss_video_set_format(struct file *file, void *fh, struct 
v4l2_format *format)
 
mutex_lock(>mutex);
 
-   /* Fill the bytesperline and sizeimage fields by converting to media bus
+   /*
+* Fill the bytesperline and sizeimage fields by converting to media bus
 * format and back to pixel format.
 */
iss_video_pix_to_mbus(>fmt.pix, );
@@ -678,8 +685,9 @@ iss_video_get_selection(struct file *file, void *fh, struct 
v4l2_selection *sel)
if (subdev == NULL)
return -EINVAL;
 
-   /* Try the get selection operation first and fallback to get format if 
not
-* implemented.
+   /*
+* Try the get selection operation first and fallback to get format if
+* not implemented.
 */
sdsel.pad = pad;
ret = v4l2_subdev_call(subdev, pad, get_selection, NULL, );
@@ -867,7 +875,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
 
mutex_lock(>stream_lock);
 
-   /* Start streaming on the pipeline. No link touching an entity in the
+   /*
+* Start streaming on the pipeline. No link touching an entity in the
 * pipeline can be activated or deactivated once streaming is started.
 */
pipe = entity->pipe
@@ -895,7 +904,8 @@ iss_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
while ((entity = media_entity_graph_walk_next()))
media_entity_enum_se