diff options
author | Ann Thornton <Ann.Thornton@freescale.com> | 2009-09-17 16:48:49 -0500 |
---|---|---|
committer | Ann Thornton <Ann.Thornton@freescale.com> | 2009-09-17 16:50:03 -0500 |
commit | 9270e1b862ba4f8cbc253c5ea5c9c954b029d578 (patch) | |
tree | 888bc94718b9910d2f1c8c409bad2af62c53fab1 | |
parent | 7a29b28a745d767a0a2f4168c154748a8c288c8a (diff) |
ENGR00116578 Fix IPU warnings
Fixed all the compiler warnings that I encountered.
Signed-off-by: Ann Thornton <Ann.Thornton@freescale.com>
-rw-r--r-- | drivers/mxc/ipu3/ipu_common.c | 3 | ||||
-rw-r--r-- | drivers/mxc/ipu3/ipu_disp.c | 5 | ||||
-rw-r--r-- | drivers/mxc/ipu3/ipu_ic.c | 2 | ||||
-rw-r--r-- | drivers/mxc/ipu3/ipu_prv.h | 2 | ||||
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 7 |
5 files changed, 11 insertions, 8 deletions
diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c index 6af1804f9700..79fc0316fec3 100644 --- a/drivers/mxc/ipu3/ipu_common.c +++ b/drivers/mxc/ipu3/ipu_common.c @@ -363,6 +363,8 @@ int32_t ipu_init_channel(ipu_channel_t channel, ipu_channel_params_t *params) IPU_CHAN_ID(channel)); } + ipu_conf = __raw_readl(IPU_CONF); + switch (channel) { case CSI_MEM0: case CSI_MEM1: @@ -599,7 +601,6 @@ int32_t ipu_init_channel(ipu_channel_t channel, ipu_channel_params_t *params) /* Enable IPU sub module */ g_channel_init_mask |= 1L << IPU_CHAN_ID(channel); - ipu_conf = __raw_readl(IPU_CONF); if (ipu_ic_use_count == 1) ipu_conf |= IPU_CONF_IC_EN; if (ipu_vdi_use_count == 1) { diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c index 2a5fb4ad5322..79b0c2123c22 100644 --- a/drivers/mxc/ipu3/ipu_disp.c +++ b/drivers/mxc/ipu3/ipu_disp.c @@ -139,13 +139,14 @@ static void _ipu_di_sync_config(int di, int wave_gen, int cnt_polarity_trigger_src, int cnt_up, int cnt_down) { + u32 reg; + if ((run_count >= 0x1000) || (offset_count >= 0x1000) || (repeat_count >= 0x1000) || (cnt_up >= 0x400) || (cnt_down >= 0x400)) { dev_err(g_ipu_dev, "DI%d counters out of range.\n", di); return; } - u32 reg; reg = (run_count << 19) | (++run_src << 16) | (offset_count << 3) | ++offset_src; __raw_writel(reg, DI_SW_GEN0(di, wave_gen)); @@ -841,7 +842,7 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk, uint32_t field1_offset; uint32_t reg; uint32_t disp_gen, di_gen, vsync_cnt; - uint32_t div, up; + uint32_t div; uint32_t h_total, v_total; int map; struct clk *di_clk; diff --git a/drivers/mxc/ipu3/ipu_ic.c b/drivers/mxc/ipu3/ipu_ic.c index 2df9894dbd4e..45894265a630 100644 --- a/drivers/mxc/ipu3/ipu_ic.c +++ b/drivers/mxc/ipu3/ipu_ic.c @@ -157,6 +157,7 @@ void _ipu_vdi_init(ipu_channel_t channel, ipu_channel_params_t *params) { uint32_t reg; uint32_t pixel_fmt; + bool top_field_0; reg = ((params->mem_prp_vf_mem.in_height-1) << 16) | (params->mem_prp_vf_mem.in_width-1); @@ -185,7 +186,6 @@ void _ipu_vdi_init(ipu_channel_t channel, ipu_channel_params_t *params) } __raw_writel(reg, VDI_C); - bool top_field_0; /* MED_MOTION and LOW_MOTION algorithm that are using 3 fields * should start presenting using the 2nd field. */ diff --git a/drivers/mxc/ipu3/ipu_prv.h b/drivers/mxc/ipu3/ipu_prv.h index cc5e93c7bce1..c9884068283f 100644 --- a/drivers/mxc/ipu3/ipu_prv.h +++ b/drivers/mxc/ipu3/ipu_prv.h @@ -78,7 +78,7 @@ void _ipu_ic_init_rotate_pp(ipu_channel_params_t *params); void _ipu_ic_uninit_rotate_pp(void); int _ipu_ic_idma_init(int dma_chan, uint16_t width, uint16_t height, int burst_size, ipu_rotate_mode_t rot); -void _ipu_vdi_toggle_top_field_man(); +void _ipu_vdi_toggle_top_field_man(void); int _ipu_csi_init(ipu_channel_t channel, uint32_t csi); void ipu_csi_set_test_generator(bool active, uint32_t r_value, uint32_t g_value, uint32_t b_value, diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index 06c3dfd69704..19f301d2dfb4 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -705,7 +705,7 @@ static int mxcfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) { struct mxcfb_loc_alpha la; int i; - char *video_plane_idstr; + char *video_plane_idstr = ""; if (copy_from_user(&la, (void *)arg, sizeof(la))) { retval = -EFAULT; @@ -1486,9 +1486,10 @@ static int mxcfb_probe(struct platform_device *pdev) platform_set_drvdata(pdev, fbi); - device_create_file(fbi->dev, &dev_attr_fsl_disp_property); + ret = device_create_file(fbi->dev, &dev_attr_fsl_disp_property); + if (ret) + dev_err(&pdev->dev, "Error %d on creating file\n", ret); - dev_err(&pdev->dev, "fb registered, using mode %s\n", fb_mode); return 0; err2: |