summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjay Singh Rawat <srawat@nvidia.com>2012-06-04 17:21:36 +0530
committerSimone Willett <swillett@nvidia.com>2012-06-06 17:12:56 -0700
commit50053b22fb5605eac717c8657c16fdf85a9c5b5e (patch)
treec0fa7633232c09227fca34e7845d4ee7477e27de
parent93d719048d06bf3cddff7ee6cdd46b42160101a9 (diff)
media: video: tegra: resolve compilation warnings
- Adding flag to treat warning as error. - Warnings handled are unused functions, wrong C coding style, function argument mismatch. Bug 949219 Change-Id: I52cf5298ba552747dd4292af5b20db5ac8993cb0 Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/106208 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r--drivers/media/video/tegra/Makefile2
-rw-r--r--drivers/media/video/tegra/ad5816.c22
-rw-r--r--drivers/media/video/tegra/nvavp/nvavp_dev.c6
-rw-r--r--drivers/media/video/tegra/ov5640.c2
-rw-r--r--drivers/media/video/tegra/tegra_camera.c11
5 files changed, 20 insertions, 23 deletions
diff --git a/drivers/media/video/tegra/Makefile b/drivers/media/video/tegra/Makefile
index 3c1a0ce4638e..7d7285e06fb7 100644
--- a/drivers/media/video/tegra/Makefile
+++ b/drivers/media/video/tegra/Makefile
@@ -1,4 +1,6 @@
GCOV_PROFILE := y
+
+subdir-ccflags-y := -Werror
#
# Makefile for the video capture/playback device drivers.
#
diff --git a/drivers/media/video/tegra/ad5816.c b/drivers/media/video/tegra/ad5816.c
index ed113b3a187c..2005f150d6fd 100644
--- a/drivers/media/video/tegra/ad5816.c
+++ b/drivers/media/video/tegra/ad5816.c
@@ -628,16 +628,6 @@ static int ad5816_dev_id(struct ad5816_info *info)
return err;
}
-static void ad5816_sts_rd(struct ad5816_info *info)
-{
- /**
- * Device specific code for status
- *
- * TODO: Ad5816 has support to get status for over/under
- * voltage conditions but currently this feature is not
- * required.
- */
-}
/**
* Below are device specific functions.
*/
@@ -663,12 +653,13 @@ static int ad5816_position_rd(struct ad5816_info *info, unsigned *position)
static int ad5816_position_wr(struct ad5816_info *info, unsigned position)
{
- position = position + info->config.pos_low;
+ u16 data;
+ position = position + info->config.pos_low;
if(position > info->config.pos_high)
position = info->config.pos_high;
- u16 data = position & 0x03ff;
+ data = position & 0x03ff;
return ad5816_i2c_wr16(info, VCM_CODE_MSB, data);
}
@@ -757,10 +748,8 @@ static int ad5816_param_rd(struct ad5816_info *info, unsigned long arg)
}
static int ad5816_param_wr_s(struct ad5816_info *info,
- struct nvc_param *params,
- u32 u32val)
+ struct nvc_param *params, u32 u32val)
{
- struct nvc_focus_cap cap;
u8 u8val;
int err = 0;
u8val = (u8)u32val;
@@ -1102,10 +1091,11 @@ static int ad5816_probe(
struct i2c_client *client,
const struct i2c_device_id *id)
{
- pr_info("ad5816: probing focuser.\n");
struct ad5816_info *info;
char dname[16];
int err;
+
+ pr_info("ad5816: probing focuser.\n");
dev_dbg(&client->dev, "%s\n", __func__);
info = devm_kzalloc(&client->dev, sizeof(*info), GFP_KERNEL);
if (info == NULL) {
diff --git a/drivers/media/video/tegra/nvavp/nvavp_dev.c b/drivers/media/video/tegra/nvavp/nvavp_dev.c
index e2bad8150d3a..bdb649f3e87f 100644
--- a/drivers/media/video/tegra/nvavp/nvavp_dev.c
+++ b/drivers/media/video/tegra/nvavp/nvavp_dev.c
@@ -203,8 +203,8 @@ static void nvavp_set_channel_control_area(struct nvavp_info *nvavp, int channel
writel(0x0, &control->get);
pr_debug("nvavp_set_channel_control_area for channel_id (%d):\
- control->put (0x%x) control->get (0x%x)\n",
- channel_id, &control->put, &control->get);
+ control->put (0x%08x) control->get (0x%08x)\n",
+ channel_id, (u32) &control->put, (u32) &control->get);
/* enable avp VDE clock control and disable iram clock gating */
writel(0x0, &control->idle_clk_enable);
@@ -535,7 +535,7 @@ static int nvavp_pushbuffer_update(struct nvavp_info *nvavp, u32 phys_addr,
control = channel_info->os_control;
pr_debug("nvavp_pushbuffer_update for channel_id (%d):\
control->put (0x%x) control->get (0x%x)\n",
- channel_id, &control->put, &control->get);
+ channel_id, (u32) &control->put, (u32) &control->get);
mutex_lock(&channel_info->pushbuffer_lock);
diff --git a/drivers/media/video/tegra/ov5640.c b/drivers/media/video/tegra/ov5640.c
index b20c036bb06c..26580b0105e3 100644
--- a/drivers/media/video/tegra/ov5640.c
+++ b/drivers/media/video/tegra/ov5640.c
@@ -108,6 +108,7 @@ static int ov5640_read_reg(struct i2c_client *client, u16 addr, u8 *val)
return 0;
}
+#ifdef KERNEL_WARNING
static int ov5640_write_reg(struct i2c_client *client, u8 addr, u8 value)
{
int count;
@@ -134,6 +135,7 @@ static int ov5640_write_reg(struct i2c_client *client, u8 addr, u8 value)
addr, (u32)value);
return -EIO;
}
+#endif
static int ov5640_write_bulk_reg(struct i2c_client *client, u8 *data, int len)
{
diff --git a/drivers/media/video/tegra/tegra_camera.c b/drivers/media/video/tegra/tegra_camera.c
index de0c662ba613..5c1cbfe63a28 100644
--- a/drivers/media/video/tegra/tegra_camera.c
+++ b/drivers/media/video/tegra/tegra_camera.c
@@ -183,10 +183,13 @@ static int tegra_camera_clk_set_rate(struct tegra_camera_dev *dev)
tegra_clk_cfg_ex(clk, TEGRA_CLK_VI_INP_SEL, 2);
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
- u32 val;
- void __iomem *apb_misc = IO_ADDRESS(TEGRA_APB_MISC_BASE);
- val = readl(apb_misc + 0x42c);
- writel(val | 0x1, apb_misc + 0x42c);
+ {
+ u32 val;
+ void __iomem *apb_misc =
+ IO_ADDRESS(TEGRA_APB_MISC_BASE);
+ val = readl(apb_misc + 0x42c);
+ writel(val | 0x1, apb_misc + 0x42c);
+ }
#endif
}