[PATCH V3 14/15] [media] marvell-ccic: use unsigned int type replace int type

2012-12-15 Thread Albert Wang
This patch use unsigned int type replace int type in marvell-ccic.

These variables: frame number, buf number, irq... should be unsigned.

Signed-off-by: Albert Wang 
Signed-off-by: Libin Yang 
---
 .../media/platform/marvell-ccic/mcam-core-soc.h|2 +-
 .../platform/marvell-ccic/mcam-core-standard.h |   10 -
 drivers/media/platform/marvell-ccic/mcam-core.c|   22 ++--
 drivers/media/platform/marvell-ccic/mcam-core.h|2 +-
 drivers/media/platform/marvell-ccic/mmp-driver.c   |2 +-
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core-soc.h 
b/drivers/media/platform/marvell-ccic/mcam-core-soc.h
index fbdaa5d..cb1504a 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core-soc.h
+++ b/drivers/media/platform/marvell-ccic/mcam-core-soc.h
@@ -11,7 +11,7 @@ extern const struct vb2_ops mcam_vb2_ops;
 
 void mcam_ctlr_power_up(struct mcam_camera *cam);
 void mcam_ctlr_power_down(struct mcam_camera *cam);
-void mcam_dma_contig_done(struct mcam_camera *cam, int frame);
+void mcam_dma_contig_done(struct mcam_camera *cam, unsigned int frame);
 void mcam_ctlr_stop(struct mcam_camera *cam);
 int mcam_config_mipi(struct mcam_camera *mcam, int enable);
 void mcam_ctlr_image(struct mcam_camera *cam);
diff --git a/drivers/media/platform/marvell-ccic/mcam-core-standard.h 
b/drivers/media/platform/marvell-ccic/mcam-core-standard.h
index 154ea4f..363ae43 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core-standard.h
+++ b/drivers/media/platform/marvell-ccic/mcam-core-standard.h
@@ -4,8 +4,8 @@
  * Copyright 2011 Jonathan Corbet cor...@lwn.net
  */
 extern bool mcam_alloc_bufs_at_read;
-extern int mcam_n_dma_bufs;
-extern int mcam_buffer_mode;
+extern unsigned int mcam_n_dma_bufs;
+extern unsigned int mcam_buffer_mode;
 extern const struct vb2_ops mcam_vb2_sg_ops;
 extern const struct vb2_ops mcam_vb2_ops;
 
@@ -15,12 +15,12 @@ void mcam_ctlr_power_up(struct mcam_camera *cam);
 void mcam_ctlr_power_down(struct mcam_camera *cam);
 void mcam_free_dma_bufs(struct mcam_camera *cam);
 void mcam_ctlr_dma_sg(struct mcam_camera *cam);
-void mcam_dma_sg_done(struct mcam_camera *cam, int frame);
+void mcam_dma_sg_done(struct mcam_camera *cam, unsigned int frame);
 int mcam_check_dma_buffers(struct mcam_camera *cam);
 void mcam_set_config_needed(struct mcam_camera *cam, int needed);
 int __mcam_cam_reset(struct mcam_camera *cam);
 int mcam_alloc_dma_bufs(struct mcam_camera *cam, int loadtime);
 void mcam_ctlr_dma_contig(struct mcam_camera *cam);
-void mcam_dma_contig_done(struct mcam_camera *cam, int frame);
+void mcam_dma_contig_done(struct mcam_camera *cam, unsigned int frame);
 void mcam_ctlr_dma_vmalloc(struct mcam_camera *cam);
-void mcam_vmalloc_done(struct mcam_camera *cam, int frame);
+void mcam_vmalloc_done(struct mcam_camera *cam, unsigned int frame);
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index 97b40db..2a4d481 100755
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -106,7 +106,7 @@ static inline struct mcam_vb_buffer *vb_to_mvb(struct 
vb2_buffer *vb)
 /*
  * Hand a completed buffer back to user space.
  */
-static void mcam_buffer_done(struct mcam_camera *cam, int frame,
+static void mcam_buffer_done(struct mcam_camera *cam, unsigned int frame,
struct vb2_buffer *vbuf)
 {
vbuf->v4l2_buf.bytesused = cam->pix_format.sizeimage;
@@ -120,7 +120,7 @@ static void mcam_buffer_done(struct mcam_camera *cam, int 
frame,
  */
 static void mcam_reset_buffers(struct mcam_camera *cam)
 {
-   int i;
+   unsigned int i;
 
cam->next_buf = -1;
for (i = 0; i < cam->nbufs; i++) {
@@ -215,7 +215,7 @@ int mcam_config_mipi(struct mcam_camera *mcam, int enable)
  */
 int mcam_alloc_dma_bufs(struct mcam_camera *cam, int loadtime)
 {
-   int i;
+   unsigned int i;
 
mcam_set_config_needed(cam, 1);
if (loadtime)
@@ -256,7 +256,7 @@ int mcam_alloc_dma_bufs(struct mcam_camera *cam, int 
loadtime)
 
 void mcam_free_dma_bufs(struct mcam_camera *cam)
 {
-   int i;
+   unsigned int i;
 
for (i = 0; i < cam->nbufs; i++) {
dma_free_coherent(cam->dev, cam->dma_buf_size,
@@ -295,7 +295,7 @@ void mcam_ctlr_dma_vmalloc(struct mcam_camera *cam)
 static void mcam_frame_tasklet(unsigned long data)
 {
struct mcam_camera *cam = (struct mcam_camera *) data;
-   int i;
+   unsigned int i;
unsigned long flags;
struct mcam_vb_buffer *buf;
 
@@ -343,7 +343,7 @@ int mcam_check_dma_buffers(struct mcam_camera *cam)
return 0;
 }
 
-void mcam_vmalloc_done(struct mcam_camera *cam, int frame)
+void mcam_vmalloc_done(struct mcam_camera *cam, unsigned int frame)
 {
tasklet_schedule(&cam->s_tasklet);
 }
@@ -395,7 +395,7 @@ static bool mcam_fmt_is_planar(__u32 pfmt)
  * space.  In this way, 

Re: [PATCH V3 14/15] [media] marvell-ccic: use unsigned int type replace int type

2012-12-16 Thread Jonathan Corbet
On Sat, 15 Dec 2012 17:58:03 +0800
Albert Wang  wrote:

> This patch use unsigned int type replace int type in marvell-ccic.
> 
> These variables: frame number, buf number, irq... should be unsigned.

Acked-by: Jonathan Corbet 

jon
--
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