Commit 2891f37c authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] V4L: ov772x: rename macros to not pollute the global namespace

Macros, defined in a header under include/ should be kept in a local
namespace and not pollute the global one.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 59ca25b7
...@@ -822,13 +822,13 @@ static int ov772x_set_params(struct i2c_client *client, u32 *width, u32 *height, ...@@ -822,13 +822,13 @@ static int ov772x_set_params(struct i2c_client *client, u32 *width, u32 *height,
goto ov772x_set_fmt_error; goto ov772x_set_fmt_error;
ret = ov772x_mask_set(client, ret = ov772x_mask_set(client,
EDGE_TRSHLD, EDGE_THRESHOLD_MASK, EDGE_TRSHLD, OV772X_EDGE_THRESHOLD_MASK,
priv->info->edgectrl.threshold); priv->info->edgectrl.threshold);
if (ret < 0) if (ret < 0)
goto ov772x_set_fmt_error; goto ov772x_set_fmt_error;
ret = ov772x_mask_set(client, ret = ov772x_mask_set(client,
EDGE_STRNGT, EDGE_STRENGTH_MASK, EDGE_STRNGT, OV772X_EDGE_STRENGTH_MASK,
priv->info->edgectrl.strength); priv->info->edgectrl.strength);
if (ret < 0) if (ret < 0)
goto ov772x_set_fmt_error; goto ov772x_set_fmt_error;
...@@ -840,13 +840,13 @@ static int ov772x_set_params(struct i2c_client *client, u32 *width, u32 *height, ...@@ -840,13 +840,13 @@ static int ov772x_set_params(struct i2c_client *client, u32 *width, u32 *height,
* set upper and lower limit * set upper and lower limit
*/ */
ret = ov772x_mask_set(client, ret = ov772x_mask_set(client,
EDGE_UPPER, EDGE_UPPER_MASK, EDGE_UPPER, OV772X_EDGE_UPPER_MASK,
priv->info->edgectrl.upper); priv->info->edgectrl.upper);
if (ret < 0) if (ret < 0)
goto ov772x_set_fmt_error; goto ov772x_set_fmt_error;
ret = ov772x_mask_set(client, ret = ov772x_mask_set(client,
EDGE_LOWER, EDGE_LOWER_MASK, EDGE_LOWER, OV772X_EDGE_LOWER_MASK,
priv->info->edgectrl.lower); priv->info->edgectrl.lower);
if (ret < 0) if (ret < 0)
goto ov772x_set_fmt_error; goto ov772x_set_fmt_error;
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#ifndef __OV772X_H__ #ifndef __OV772X_H__
#define __OV772X_H__ #define __OV772X_H__
#include <media/soc_camera.h>
/* for flags */ /* for flags */
#define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */ #define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */
#define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */ #define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */
...@@ -32,22 +30,23 @@ struct ov772x_edge_ctrl { ...@@ -32,22 +30,23 @@ struct ov772x_edge_ctrl {
unsigned char lower; unsigned char lower;
}; };
#define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */ #define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */
#define EDGE_STRENGTH_MASK 0x1F #define OV772X_EDGE_STRENGTH_MASK 0x1F
#define EDGE_THRESHOLD_MASK 0x0F #define OV772X_EDGE_THRESHOLD_MASK 0x0F
#define EDGE_UPPER_MASK 0xFF #define OV772X_EDGE_UPPER_MASK 0xFF
#define EDGE_LOWER_MASK 0xFF #define OV772X_EDGE_LOWER_MASK 0xFF
#define OV772X_AUTO_EDGECTRL(u, l) \ #define OV772X_AUTO_EDGECTRL(u, l) \
{ \ { \
.upper = (u & EDGE_UPPER_MASK), \ .upper = (u & OV772X_EDGE_UPPER_MASK), \
.lower = (l & EDGE_LOWER_MASK), \ .lower = (l & OV772X_EDGE_LOWER_MASK), \
} }
#define OV772X_MANUAL_EDGECTRL(s, t) \ #define OV772X_MANUAL_EDGECTRL(s, t) \
{ \ { \
.strength = (s & EDGE_STRENGTH_MASK) | OV772X_MANUAL_EDGE_CTRL,\ .strength = (s & OV772X_EDGE_STRENGTH_MASK) | \
.threshold = (t & EDGE_THRESHOLD_MASK), \ OV772X_MANUAL_EDGE_CTRL, \
.threshold = (t & OV772X_EDGE_THRESHOLD_MASK), \
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment