* [PATCH] staging: soc_camera.c: fixed coding style: lines over 80 char
@ 2014-08-10 20:41 Suman Kumar
2014-08-10 21:00 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Suman Kumar @ 2014-08-10 20:41 UTC (permalink / raw)
To: hverkuil
Cc: g.liakhovetski, m.chehab, linux-media, linux-kernel, suman,
kernel-janitors
Fixes a coding style issue of 'lines over 80 char' reported by
checkpatch.pl
Signed-off-by: Suman Kumar <suman@inforcecomputing.com>
---
drivers/media/platform/soc_camera/soc_camera.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 968a64b..1b7e0e1 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -115,7 +115,8 @@ eregenable:
}
EXPORT_SYMBOL(soc_camera_power_on);
-int soc_camera_power_off(struct device *dev, struct soc_camera_subdev_desc *ssdd,
+int soc_camera_power_off(struct device *dev,
+ struct soc_camera_subdev_desc *ssdd,
struct v4l2_clk *clk)
{
int ret = 0;
@@ -144,7 +145,8 @@ int soc_camera_power_off(struct device *dev, struct soc_camera_subdev_desc *ssdd
}
EXPORT_SYMBOL(soc_camera_power_off);
-int soc_camera_power_init(struct device *dev, struct soc_camera_subdev_desc *ssdd)
+int soc_camera_power_init(struct device *dev,
+ struct soc_camera_subdev_desc *ssdd)
{
/* Should not have any effect in synchronous case */
return devm_regulator_bulk_get(dev, ssdd->sd_pdata.num_regulators,
@@ -199,7 +201,9 @@ unsigned long soc_camera_apply_board_flags(struct soc_camera_subdev_desc *ssdd,
{
unsigned long f, flags = cfg->flags;
- /* If only one of the two polarities is supported, switch to the opposite */
+ /* If only one of the two polarities is supported,
+ * switch to the opposite
+ */
if (ssdd->flags & SOCAM_SENSOR_INVERT_HSYNC) {
f = flags & (V4L2_MBUS_HSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_LOW);
if (f == V4L2_MBUS_HSYNC_ACTIVE_HIGH || f == V4L2_MBUS_HSYNC_ACTIVE_LOW)
@@ -1430,7 +1434,7 @@ static int soc_camera_async_bound(struct v4l2_async_notifier *notifier,
struct v4l2_async_subdev *asd)
{
struct soc_camera_async_client *sasc = container_of(notifier,
- struct soc_camera_async_client, notifier);
+ struct soc_camera_async_client, notifier);
struct soc_camera_device *icd = platform_get_drvdata(sasc->pdev);
if (asd == sasc->sensor && !WARN_ON(icd->control)) {
@@ -1463,7 +1467,7 @@ static void soc_camera_async_unbind(struct v4l2_async_notifier *notifier,
struct v4l2_async_subdev *asd)
{
struct soc_camera_async_client *sasc = container_of(notifier,
- struct soc_camera_async_client, notifier);
+ struct soc_camera_async_client, notifier);
struct soc_camera_device *icd = platform_get_drvdata(sasc->pdev);
if (icd->clk) {
@@ -1475,7 +1479,7 @@ static void soc_camera_async_unbind(struct v4l2_async_notifier *notifier,
static int soc_camera_async_complete(struct v4l2_async_notifier *notifier)
{
struct soc_camera_async_client *sasc = container_of(notifier,
- struct soc_camera_async_client, notifier);
+ struct soc_camera_async_client, notifier);
struct soc_camera_device *icd = platform_get_drvdata(sasc->pdev);
if (to_soc_camera_control(icd)) {
@@ -1735,14 +1739,16 @@ static int default_cropcap(struct soc_camera_device *icd,
return v4l2_subdev_call(sd, video, cropcap, a);
}
-static int default_g_crop(struct soc_camera_device *icd, struct v4l2_crop *a)
+static int default_g_crop(struct soc_camera_device *icd,
+ struct v4l2_crop *a)
{
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
return v4l2_subdev_call(sd, video, g_crop, a);
}
-static int default_s_crop(struct soc_camera_device *icd, const struct v4l2_crop *a)
+static int default_s_crop(struct soc_camera_device *icd,
+ const struct v4l2_crop *a)
{
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
@@ -1926,8 +1932,8 @@ static int soc_camera_device_register(struct soc_camera_device *icd)
icd->host_priv = NULL;
/*
- * Dynamically allocated devices set the bit earlier, but it doesn't hurt setting
- * it again
+ * Dynamically allocated devices set the bit earlier,
+ * but it doesn't hurt setting it again
*/
i = to_platform_device(icd->pdev)->id;
if (i < 0)
--
1.8.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: soc_camera.c: fixed coding style: lines over 80 char
2014-08-10 20:41 [PATCH] staging: soc_camera.c: fixed coding style: lines over 80 char Suman Kumar
@ 2014-08-10 21:00 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2014-08-10 21:00 UTC (permalink / raw)
To: Suman Kumar
Cc: hverkuil, g.liakhovetski, m.chehab, linux-media, linux-kernel,
kernel-janitors
On Mon, 2014-08-11 at 02:11 +0530, Suman Kumar wrote:
> Fixes a coding style issue of 'lines over 80 char' reported by
> checkpatch.pl
[]
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
[]
> @@ -1430,7 +1434,7 @@ static int soc_camera_async_bound(struct v4l2_async_notifier *notifier,
> struct v4l2_async_subdev *asd)
> {
> struct soc_camera_async_client *sasc = container_of(notifier,
> - struct soc_camera_async_client, notifier);
> + struct soc_camera_async_client, notifier);
> struct soc_camera_device *icd = platform_get_drvdata(sasc->pdev);
I don't easily parse the original or modified lines.
If you are really concerned abut 80 columns and readability
instead of merely quieting checkpatch, these might be better
on multiple lines like
struct soc_camera_async_client *sasc;
struct soc_camera_device *icd;
sasc = container_of(notifier, struct soc_camera_async_client, notifier);
icd = platform_get_drvdata(sasc->pdev);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-10 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-10 20:41 [PATCH] staging: soc_camera.c: fixed coding style: lines over 80 char Suman Kumar
2014-08-10 21:00 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox