[PATCH] staging: omap4iss: copy paste error in iss_get_clocks

2014-06-05 Thread Vitaly Osipov
It makes more sense to return PTR_ERR(iss-iss_ctrlclk) here. The
current code looks like an oversight in pasting the block just above
this one.

Signed-off-by: Vitaly Osipov vitaly.osi...@gmail.com
---
 drivers/staging/media/omap4iss/iss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap4iss/iss.c 
b/drivers/staging/media/omap4iss/iss.c
index 2e422dd..4a9e444 100644
--- a/drivers/staging/media/omap4iss/iss.c
+++ b/drivers/staging/media/omap4iss/iss.c
@@ -1029,7 +1029,7 @@ static int iss_get_clocks(struct iss_device *iss)
if (IS_ERR(iss-iss_ctrlclk)) {
dev_err(iss-dev, Unable to get iss_ctrlclk clock info\n);
iss_put_clocks(iss);
-   return PTR_ERR(iss-iss_fck);
+   return PTR_ERR(iss-iss_ctrlclk);
}
 
return 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] staging: media: omap24xx: fix up checkpatch error message

2014-04-10 Thread Vitaly Osipov
tcm825x.c and tcm825x.h:

fixing ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Vitaly Osipov vitaly.osi...@gmail.com
---
 drivers/staging/media/omap24xx/tcm825x.c |8 
 drivers/staging/media/omap24xx/tcm825x.h |4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/omap24xx/tcm825x.c 
b/drivers/staging/media/omap24xx/tcm825x.c
index f4dd32d..2326481 100644
--- a/drivers/staging/media/omap24xx/tcm825x.c
+++ b/drivers/staging/media/omap24xx/tcm825x.c
@@ -89,10 +89,10 @@ static const struct tcm825x_reg rgb565  =   { 0x02, 
TCM825X_PICFMT };
 
 /* Our own specific controls */
 #define V4L2_CID_ALC   V4L2_CID_PRIVATE_BASE
-#define V4L2_CID_H_EDGE_EN V4L2_CID_PRIVATE_BASE + 1
-#define V4L2_CID_V_EDGE_EN V4L2_CID_PRIVATE_BASE + 2
-#define V4L2_CID_LENS  V4L2_CID_PRIVATE_BASE + 3
-#define V4L2_CID_MAX_EXPOSURE_TIME V4L2_CID_PRIVATE_BASE + 4
+#define V4L2_CID_H_EDGE_EN (V4L2_CID_PRIVATE_BASE + 1)
+#define V4L2_CID_V_EDGE_EN (V4L2_CID_PRIVATE_BASE + 2)
+#define V4L2_CID_LENS  (V4L2_CID_PRIVATE_BASE + 3)
+#define V4L2_CID_MAX_EXPOSURE_TIME (V4L2_CID_PRIVATE_BASE + 4)
 #define V4L2_CID_LAST_PRIV V4L2_CID_MAX_EXPOSURE_TIME
 
 /*  Video controls  */
diff --git a/drivers/staging/media/omap24xx/tcm825x.h 
b/drivers/staging/media/omap24xx/tcm825x.h
index 9970fb1..4a41127 100644
--- a/drivers/staging/media/omap24xx/tcm825x.h
+++ b/drivers/staging/media/omap24xx/tcm825x.h
@@ -21,8 +21,8 @@
 
 #define TCM825X_NAME tcm825x
 
-#define TCM825X_MASK(x)  x  0x00ff
-#define TCM825X_ADDR(x) (x  0xff00)  8
+#define TCM825X_MASK(x)  (x  0x00ff)
+#define TCM825X_ADDR(x) ((x  0xff00)  8)
 
 /* The TCM825X I2C sensor chip has a fixed slave address of 0x3d. */
 #define TCM825X_I2C_ADDR   0x3d
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] staging: media: omap24xx: fix up a checkpatch.pl warning

2014-04-10 Thread Vitaly Osipov
tcm825x.c:

changed printk to pr_info

Signed-off-by: Vitaly Osipov vitaly.osi...@gmail.com
---
 drivers/staging/media/omap24xx/tcm825x.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/omap24xx/tcm825x.c 
b/drivers/staging/media/omap24xx/tcm825x.c
index 2326481..3367ccd 100644
--- a/drivers/staging/media/omap24xx/tcm825x.c
+++ b/drivers/staging/media/omap24xx/tcm825x.c
@@ -914,8 +914,8 @@ static int __init tcm825x_init(void)
 
rval = i2c_add_driver(tcm825x_i2c_driver);
if (rval)
-   printk(KERN_INFO %s: failed registering  TCM825X_NAME \n,
-  __func__);
+   pr_info(%s: failed registering  TCM825X_NAME \n,
+   __func__);
 
return rval;
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] staging: media: omap24xx: fix up a checkpatch.pl warning

2014-04-10 Thread Vitaly Osipov
Thanks, that's helpful - I for some reason thought that multi-part
patch had to have more or less uniform subject. We the checkpatch.pl
people come from http://www.eudyptula-challenge.org/, where at some
stage we are told to submit a patch for a single style issue in the
staging tree. All newbies... Hoping to be back with more substantial
contributions soon.
Regards,
Vitaly


On Thu, Apr 10, 2014 at 7:48 PM, Dan Carpenter dan.carpen...@oracle.com wrote:
 The two subjects are really close to being the same.  You should choose
 better subjects.  Like:

 [PATCH 2/2] staging: media: omap24xx: use pr_info() instead of KERN_INFO


 (All the checkpatch.pl people use the exact same subject for everything
 though, so you're not alone in this).

 regards,
 dan carpenter

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] staging: media: omap24xx: fix up some checkpatch.pl issues

2014-04-09 Thread Vitaly Osipov
tcm825x.c:

ERROR: Macros with complex values should be enclosed in parenthesis
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then 
dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

tcm825x.h:

ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Vitaly Osipov vitaly.osi...@gmail.com
---
 drivers/staging/media/omap24xx/tcm825x.c |   40 +++---
 drivers/staging/media/omap24xx/tcm825x.h |4 +--
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/media/omap24xx/tcm825x.c 
b/drivers/staging/media/omap24xx/tcm825x.c
index f4dd32d..48186a4 100644
--- a/drivers/staging/media/omap24xx/tcm825x.c
+++ b/drivers/staging/media/omap24xx/tcm825x.c
@@ -89,10 +89,10 @@ static const struct tcm825x_reg rgb565  =   { 0x02, 
TCM825X_PICFMT };
 
 /* Our own specific controls */
 #define V4L2_CID_ALC   V4L2_CID_PRIVATE_BASE
-#define V4L2_CID_H_EDGE_EN V4L2_CID_PRIVATE_BASE + 1
-#define V4L2_CID_V_EDGE_EN V4L2_CID_PRIVATE_BASE + 2
-#define V4L2_CID_LENS  V4L2_CID_PRIVATE_BASE + 3
-#define V4L2_CID_MAX_EXPOSURE_TIME V4L2_CID_PRIVATE_BASE + 4
+#define V4L2_CID_H_EDGE_EN (V4L2_CID_PRIVATE_BASE + 1)
+#define V4L2_CID_V_EDGE_EN (V4L2_CID_PRIVATE_BASE + 2)
+#define V4L2_CID_LENS  (V4L2_CID_PRIVATE_BASE + 3)
+#define V4L2_CID_MAX_EXPOSURE_TIME (V4L2_CID_PRIVATE_BASE + 4)
 #define V4L2_CID_LAST_PRIV V4L2_CID_MAX_EXPOSURE_TIME
 
 /*  Video controls  */
@@ -350,8 +350,8 @@ static int tcm825x_write_default_regs(struct i2c_client 
*client,
int err;
const struct tcm825x_reg *next = reglist;
 
-   while (!((next-reg == TCM825X_REG_TERM)
- (next-val == TCM825X_VAL_TERM))) {
+   while (!((next-reg == TCM825X_REG_TERM) 
+(next-val == TCM825X_VAL_TERM))) {
err = tcm825x_write_reg(client, next-reg, next-val);
if (err) {
dev_err(client-dev, register writing failed\n);
@@ -472,7 +472,7 @@ static int tcm825x_configure(struct v4l2_int_device *s)
 }
 
 static int ioctl_queryctrl(struct v4l2_int_device *s,
-   struct v4l2_queryctrl *qc)
+  struct v4l2_queryctrl *qc)
 {
struct vcontrol *control;
 
@@ -487,7 +487,7 @@ static int ioctl_queryctrl(struct v4l2_int_device *s,
 }
 
 static int ioctl_g_ctrl(struct v4l2_int_device *s,
-struct v4l2_control *vc)
+   struct v4l2_control *vc)
 {
struct tcm825x_sensor *sensor = s-priv;
struct i2c_client *client = sensor-i2c_client;
@@ -532,7 +532,7 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
 }
 
 static int ioctl_s_ctrl(struct v4l2_int_device *s,
-struct v4l2_control *vc)
+   struct v4l2_control *vc)
 {
struct tcm825x_sensor *sensor = s-priv;
struct i2c_client *client = sensor-i2c_client;
@@ -571,7 +571,7 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
 }
 
 static int ioctl_enum_fmt_cap(struct v4l2_int_device *s,
-  struct v4l2_fmtdesc *fmt)
+ struct v4l2_fmtdesc *fmt)
 {
int index = fmt-index;
 
@@ -637,7 +637,7 @@ static int ioctl_try_fmt_cap(struct v4l2_int_device *s,
 }
 
 static int ioctl_s_fmt_cap(struct v4l2_int_device *s,
-   struct v4l2_format *f)
+  struct v4l2_format *f)
 {
struct tcm825x_sensor *sensor = s-priv;
struct v4l2_pix_format *pix = f-fmt.pix;
@@ -655,7 +655,7 @@ static int ioctl_s_fmt_cap(struct v4l2_int_device *s,
 }
 
 static int ioctl_g_fmt_cap(struct v4l2_int_device *s,
-   struct v4l2_format *f)
+  struct v4l2_format *f)
 {
struct tcm825x_sensor *sensor = s-priv;
 
@@ -665,7 +665,7 @@ static int ioctl_g_fmt_cap(struct v4l2_int_device *s,
 }
 
 static int ioctl_g_parm(struct v4l2_int_device *s,
-struct v4l2_streamparm *a)
+   struct v4l2_streamparm *a)
 {
struct tcm825x_sensor *sensor = s-priv;
struct v4l2_captureparm *cparm = a-parm.capture;
@@ -683,7 +683,7 @@ static int ioctl_g_parm(struct v4l2_int_device *s,
 }
 
 static int ioctl_s_parm(struct v4l2_int_device *s,
-struct v4l2_streamparm *a)
+   struct v4l2_streamparm *a)
 {
struct tcm825x_sensor *sensor = s-priv;
struct v4l2_fract *timeperframe = a-parm.capture.timeperframe;
@@ -693,8 +693,8 @@ static int ioctl_s_parm(struct v4l2_int_device *s,
if (a-type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
 
-   if ((timeperframe-numerator == 0