summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSanjay Singh Rawat <srawat@nvidia.com>2012-06-07 15:15:38 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-06-07 16:47:41 +0530
commit8361972e5c70037d35fc29e92c394414db25d26e (patch)
tree97ea06237ff7604a9b8040ea670d0ffb8a43585b /drivers
parent03291056f7749a0a9a88f9fae707b0bb9533940c (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 Conflicts: drivers/media/video/tegra/ad5816.c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/tegra/Makefile2
-rw-r--r--drivers/media/video/tegra/ad5816.c13
-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, 15 insertions, 19 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 a6e6e6bac5f6..5b4d6d8b41cb 100644
--- a/drivers/media/video/tegra/ad5816.c
+++ b/drivers/media/video/tegra/ad5816.c
@@ -631,16 +631,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.
*/
@@ -669,7 +659,6 @@ static int ad5816_position_wr(struct ad5816_info *info, unsigned position)
u16 data;
position = position + info->config.pos_low;
-
if(position > info->config.pos_high)
position = info->config.pos_high;
@@ -762,7 +751,7 @@ 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)
{
u8 u8val;
int err = 0;
diff --git a/drivers/media/video/tegra/nvavp/nvavp_dev.c b/drivers/media/video/tegra/nvavp/nvavp_dev.c
index d7402e63996f..a7b3712a0d0d 100644
--- a/drivers/media/video/tegra/nvavp/nvavp_dev.c
+++ b/drivers/media/video/tegra/nvavp/nvavp_dev.c
@@ -204,8 +204,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);
@@ -536,7 +536,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 05a42dd63dc6..7bbd2971940b 100644
--- a/drivers/media/video/tegra/ov5640.c
+++ b/drivers/media/video/tegra/ov5640.c
@@ -109,6 +109,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;
@@ -135,6 +136,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 ec0afcc45328..d0b6de35570f 100644
--- a/drivers/media/video/tegra/tegra_camera.c
+++ b/drivers/media/video/tegra/tegra_camera.c
@@ -186,10 +186,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
}