aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2010-02-26 19:58:07 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 19:43:07 -0500
commit3a8954e8f22cf31791d8c524c2839433e39f9368 (patch)
treecf2882bb6f05494e31ec485a63917255e5ca9ebc
parent5617f9da4619ec975514e6b385a052e024215da3 (diff)
staging: dt3155: revert u_long to u64 usage
Commit 9c1390a923ddb6fba1cf9d7440743369140c6d8a replaced all u_int's with u32 and u_long's with u64. Unfortunately, a u_long is still only 32-bits so they should have been replaced with u32 also. This can be verified by the register definitions in dt3155_io.h. It specifically states that the memory mapped registers are 32-bit. Fix this by changing all the u64 to u32. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/dt3155/allocator.c2
-rw-r--r--drivers/staging/dt3155/allocator.h2
-rw-r--r--drivers/staging/dt3155/dt3155.h24
-rw-r--r--drivers/staging/dt3155/dt3155_drv.c28
-rw-r--r--drivers/staging/dt3155/dt3155_io.c16
-rw-r--r--drivers/staging/dt3155/dt3155_io.h174
-rw-r--r--drivers/staging/dt3155/dt3155_isr.c54
-rw-r--r--drivers/staging/dt3155/dt3155_isr.h2
8 files changed, 151 insertions, 151 deletions
diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c
index 114e2a86fefa..c74234c66895 100644
--- a/drivers/staging/dt3155/allocator.c
+++ b/drivers/staging/dt3155/allocator.c
@@ -195,7 +195,7 @@ int allocator_free_dma(unsigned long address)
195 * On cleanup everything is released. If the list is not empty, that a 195 * On cleanup everything is released. If the list is not empty, that a
196 * problem of our clients 196 * problem of our clients
197 */ 197 */
198int allocator_init(u64 *allocator_max) 198int allocator_init(u32 *allocator_max)
199{ 199{
200 /* check how much free memory is there */ 200 /* check how much free memory is there */
201 void *remapped; 201 void *remapped;
diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h
index 4cd81bdb3faa..bdf3268ca52d 100644
--- a/drivers/staging/dt3155/allocator.h
+++ b/drivers/staging/dt3155/allocator.h
@@ -24,5 +24,5 @@
24 24
25void allocator_free_dma(unsigned long address); 25void allocator_free_dma(unsigned long address);
26unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority); 26unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority);
27int allocator_init(u64 *); 27int allocator_init(u32 *);
28void allocator_cleanup(void); 28void allocator_cleanup(void);
diff --git a/drivers/staging/dt3155/dt3155.h b/drivers/staging/dt3155/dt3155.h
index 22292b102a33..1bf786364eec 100644
--- a/drivers/staging/dt3155/dt3155.h
+++ b/drivers/staging/dt3155/dt3155.h
@@ -79,8 +79,8 @@ struct dt3155_config_s {
79 79
80/* hold data for each frame */ 80/* hold data for each frame */
81typedef struct { 81typedef struct {
82 u64 addr; /* address of the buffer with the frame */ 82 u32 addr; /* address of the buffer with the frame */
83 u64 tag; /* unique number for the frame */ 83 u32 tag; /* unique number for the frame */
84 struct timeval time; /* time that capture took place */ 84 struct timeval time; /* time that capture took place */
85} frame_info_t; 85} frame_info_t;
86 86
@@ -101,14 +101,14 @@ struct dt3155_fbuffer_s {
101 int locked_buf; /* Buffers used by user */ 101 int locked_buf; /* Buffers used by user */
102 102
103 int ready_que[BOARD_MAX_BUFFS]; 103 int ready_que[BOARD_MAX_BUFFS];
104 u64 ready_head; /* The most recent buffer located here */ 104 u32 ready_head; /* The most recent buffer located here */
105 u64 ready_len; /* The number of ready buffers */ 105 u32 ready_len; /* The number of ready buffers */
106 106
107 int even_happened; 107 int even_happened;
108 int even_stopped; 108 int even_stopped;
109 109
110 int stop_acquire; /* Flag to stop interrupts */ 110 int stop_acquire; /* Flag to stop interrupts */
111 u64 frame_count; /* Counter for frames acquired by this card */ 111 u32 frame_count; /* Counter for frames acquired by this card */
112}; 112};
113 113
114 114
@@ -122,13 +122,13 @@ struct dt3155_fbuffer_s {
122/* There is one status structure for each card. */ 122/* There is one status structure for each card. */
123typedef struct dt3155_status_s { 123typedef struct dt3155_status_s {
124 int fixed_mode; /* if 1, we are in fixed frame mode */ 124 int fixed_mode; /* if 1, we are in fixed frame mode */
125 u64 reg_addr; /* Register address for a single card */ 125 u32 reg_addr; /* Register address for a single card */
126 u64 mem_addr; /* Buffer start addr for this card */ 126 u32 mem_addr; /* Buffer start addr for this card */
127 u64 mem_size; /* This is the amount of mem available */ 127 u32 mem_size; /* This is the amount of mem available */
128 u32 irq; /* this card's irq */ 128 u32 irq; /* this card's irq */
129 struct dt3155_config_s config; /* configuration struct */ 129 struct dt3155_config_s config; /* configuration struct */
130 struct dt3155_fbuffer_s fbuffer; /* frame buffer state struct */ 130 struct dt3155_fbuffer_s fbuffer; /* frame buffer state struct */
131 u64 state; /* this card's state */ 131 u32 state; /* this card's state */
132 u32 device_installed; /* Flag if installed. 1=installed */ 132 u32 device_installed; /* Flag if installed. 1=installed */
133} dt3155_status_t; 133} dt3155_status_t;
134 134
@@ -161,9 +161,9 @@ extern struct dt3155_status_s dt3155_status[MAXBOARDS];
161 161
162/* User code will probably want to declare one of these for each card */ 162/* User code will probably want to declare one of these for each card */
163typedef struct dt3155_read_s { 163typedef struct dt3155_read_s {
164 u64 offset; 164 u32 offset;
165 u64 frame_seq; 165 u32 frame_seq;
166 u64 state; 166 u32 state;
167 167
168 frame_info_t frame_info; 168 frame_info_t frame_info;
169} dt3155_read_t; 169} dt3155_read_t;
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index 930a3e666c0a..a67c622869d2 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -137,7 +137,7 @@ u32 dt3155_dev_open[ MAXBOARDS ] = {0
137}; 137};
138 138
139u32 ndevices = 0; 139u32 ndevices = 0;
140u64 unique_tag = 0;; 140u32 unique_tag = 0;;
141 141
142 142
143/* 143/*
@@ -180,7 +180,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs )
180 int minor = -1; 180 int minor = -1;
181 int index; 181 int index;
182 unsigned long flags; 182 unsigned long flags;
183 u64 buffer_addr; 183 u32 buffer_addr;
184 184
185 /* find out who issued the interrupt */ 185 /* find out who issued the interrupt */
186 for ( index = 0; index < ndevices; index++ ) { 186 for ( index = 0; index < ndevices; index++ ) {
@@ -249,7 +249,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs )
249 { 249 {
250 /* GCS (Aug 2, 2002) -- In field mode, dma the odd field 250 /* GCS (Aug 2, 2002) -- In field mode, dma the odd field
251 into the lower half of the buffer */ 251 into the lower half of the buffer */
252 const u64 stride = dt3155_status[ minor ].config.cols; 252 const u32 stride = dt3155_status[ minor ].config.cols;
253 buffer_addr = dt3155_fbuffer[ minor ]-> 253 buffer_addr = dt3155_fbuffer[ minor ]->
254 frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr 254 frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr
255 + (DT3155_MAX_ROWS / 2) * stride; 255 + (DT3155_MAX_ROWS / 2) * stride;
@@ -312,7 +312,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs )
312 dt3155_fbuffer[ minor ]->even_stopped = 0; 312 dt3155_fbuffer[ minor ]->even_stopped = 0;
313 313
314 printk(KERN_DEBUG "dt3155: state is now %x\n", 314 printk(KERN_DEBUG "dt3155: state is now %x\n",
315 (u32)dt3155_status[minor].state); 315 dt3155_status[minor].state);
316 } 316 }
317 else 317 else
318 { 318 {
@@ -428,7 +428,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs )
428 *****************************************************/ 428 *****************************************************/
429static void dt3155_init_isr(int minor) 429static void dt3155_init_isr(int minor)
430{ 430{
431 const u64 stride = dt3155_status[ minor ].config.cols; 431 const u32 stride = dt3155_status[ minor ].config.cols;
432 432
433 switch (dt3155_status[ minor ].state & DT3155_STATE_MODE) 433 switch (dt3155_status[ minor ].state & DT3155_STATE_MODE)
434 { 434 {
@@ -706,7 +706,7 @@ static int dt3155_open( struct inode* inode, struct file* filep)
706 706
707 if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) { 707 if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) {
708 printk ("DT3155: Not in idle state (state = %x)\n", 708 printk ("DT3155: Not in idle state (state = %x)\n",
709 (u32)dt3155_status[ minor ].state); 709 dt3155_status[ minor ].state);
710 return -EBUSY; 710 return -EBUSY;
711 } 711 }
712 712
@@ -762,7 +762,7 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf,
762{ 762{
763 /* which device are we reading from? */ 763 /* which device are we reading from? */
764 int minor = MINOR(filep->f_dentry->d_inode->i_rdev); 764 int minor = MINOR(filep->f_dentry->d_inode->i_rdev);
765 u64 offset; 765 u32 offset;
766 int frame_index;