aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa5249.c
diff options
context:
space:
mode:
authorRichard Knutsson <ricknu-0@student.ltu.se>2007-02-06 19:52:04 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:35:16 -0500
commite8be02a34a43c88a7666217b186e169a30f1609b (patch)
tree489cf3bd4a296aeac5ff583bf23045800f667ca9 /drivers/media/video/saa5249.c
parent7a9ca4a3f99129c2316ee14273ded519630c573d (diff)
V4L/DVB (5197): Convert to generic boolean-values
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa5249.c')
-rw-r--r--drivers/media/video/saa5249.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
index 3e84737878a8..f2a2f34cd626 100644
--- a/drivers/media/video/saa5249.c
+++ b/drivers/media/video/saa5249.c
@@ -124,11 +124,6 @@ struct saa5249_device
124 124
125/* General defines and debugging support */ 125/* General defines and debugging support */
126 126
127#ifndef FALSE
128#define FALSE 0
129#define TRUE 1
130#endif
131
132#define RESCHED do { cond_resched(); } while(0) 127#define RESCHED do { cond_resched(); } while(0)
133 128
134static struct video_device saa_template; /* Declared near bottom */ 129static struct video_device saa_template; /* Declared near bottom */
@@ -183,9 +178,9 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind)
183 memset(t->vdau[pgbuf].sregs, 0, sizeof(t->vdau[0].sregs)); 178 memset(t->vdau[pgbuf].sregs, 0, sizeof(t->vdau[0].sregs));
184 memset(t->vdau[pgbuf].laststat, 0, sizeof(t->vdau[0].laststat)); 179 memset(t->vdau[pgbuf].laststat, 0, sizeof(t->vdau[0].laststat));
185 t->vdau[pgbuf].expire = 0; 180 t->vdau[pgbuf].expire = 0;
186 t->vdau[pgbuf].clrfound = TRUE; 181 t->vdau[pgbuf].clrfound = true;
187 t->vdau[pgbuf].stopped = TRUE; 182 t->vdau[pgbuf].stopped = true;
188 t->is_searching[pgbuf] = FALSE; 183 t->is_searching[pgbuf] = false;
189 } 184 }
190 vd->priv=t; 185 vd->priv=t;
191 186
@@ -298,7 +293,7 @@ static int i2c_senddata(struct saa5249_device *t, ...)
298 293
299/* Get count number of bytes from I²C-device at address adr, store them in buf. Start & stop 294/* Get count number of bytes from I²C-device at address adr, store them in buf. Start & stop
300 * handshaking is done by this routine, ack will be sent after the last byte to inhibit further 295 * handshaking is done by this routine, ack will be sent after the last byte to inhibit further
301 * sending of data. If uaccess is TRUE, data is written to user-space with put_user. 296 * sending of data. If uaccess is 'true', data is written to user-space with put_user.
302 * Returns -1 if I²C-device didn't send acknowledge, 0 otherwise 297 * Returns -1 if I²C-device didn't send acknowledge, 0 otherwise
303 */ 298 */
304 299
@@ -317,7 +312,7 @@ static int i2c_getdata(struct saa5249_device *t, int count, u8 *buf)
317static int do_saa5249_ioctl(struct inode *inode, struct file *file, 312static int do_saa5249_ioctl(struct inode *inode, struct file *file,
318 unsigned int cmd, void *arg) 313 unsigned int cmd, void *arg)
319{ 314{
320 static int virtual_mode = FALSE; 315 static int virtual_mode = false;
321 struct video_device *vd = video_devdata(file); 316 struct video_device *vd = video_devdata(file);
322 struct saa5249_device *t=vd->priv; 317 struct saa5249_device *t=vd->priv;
323 318
@@ -340,7 +335,7 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
340 if (req->pgbuf < 0 || req->pgbuf >= NUM_DAUS) 335 if (req->pgbuf < 0 || req->pgbuf >= NUM_DAUS)
341 return -EINVAL; 336 return -EINVAL;
342 memset(t->vdau[req->pgbuf].pgbuf, ' ', sizeof(t->vdau[0].pgbuf)); 337 memset(t->vdau[req->pgbuf].pgbuf, ' ', sizeof(t->vdau[0].pgbuf));
343 t->vdau[req->pgbuf].clrfound = TRUE; 338 t->vdau[req->pgbuf].clrfound = true;
344 return 0; 339 return 0;
345 } 340 }
346 341
@@ -350,7 +345,7 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
350 345
351 if (req->pgbuf < 0 || req->pgbuf >= NUM_DAUS) 346 if (req->pgbuf < 0 || req->pgbuf >= NUM_DAUS)
352 return -EINVAL; 347 return -EINVAL;
353 t->vdau[req->pgbuf].clrfound = TRUE; 348 t->vdau[req->pgbuf].clrfound = true;
354 return 0; 349 return 0;
355 } 350 }
356 351
@@ -376,9 +371,9 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
376 t->vdau[req->pgbuf].sregs[4] = (req->pagemask & HR_UNIT ? 0x10 : 0) | (req->hour & 0xf); 371 t->vdau[req->pgbuf].sregs[4] = (req->pagemask & HR_UNIT ? 0x10 : 0) | (req->hour & 0xf);
377 t->vdau[req->pgbuf].sregs[5] = (req->pagemask & MIN_TEN ? 0x10 : 0) | (req->minute / 0x10); 372 t->vdau[req->pgbuf].sregs[5] = (req->pagemask & MIN_TEN ? 0x10 : 0) | (req->minute / 0x10);
378 t->vdau[req->pgbuf].sregs[6] = (req->pagemask & MIN_UNIT ? 0x10 : 0) | (req->minute & 0xf); 373 t->vdau[req->pgbuf].sregs[6] = (req->pagemask & MIN_UNIT ? 0x10 : 0) | (req->minute & 0xf);
379 t->vdau[req->pgbuf].stopped = FALSE; 374 t->vdau[req->pgbuf].stopped = false;
380 t->vdau[req->pgbuf].clrfound = TRUE; 375 t->vdau[req->pgbuf].clrfound = true;
381 t->is_searching[req->pgbuf] = TRUE; 376 t->is_searching[req->pgbuf] = true;
382 return 0; 377 return 0;
383 } 378 }
384 379
@@ -430,7 +425,7 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
430 i2c_getdata(t, 40, t->vdau[req->pgbuf].pgbuf + VTX_PAGESIZE + 23 * 40)) 425 i2c_getdata(t, 40, t->vdau[req->pgbuf].pgbuf + VTX_PAGESIZE + 23 * 40))
431 return -EIO; 426 return -EIO;
432 } 427 }
433 t->vdau[req->pgbuf].clrfound = FALSE; 428 t->vdau[req->pgbuf].clrfound = false;
434 memcpy(t->vdau[req->pgbuf].laststat, infobits, sizeof(infobits)); 429 memcpy(t->vdau[req->pgbuf].laststat, infobits, sizeof(infobits));
435 } 430 }
436 else 431 else
@@ -474,7 +469,7 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
474 return -EFAULT; 469 return -EFAULT;
475 if (!info.hamming && !info.notfound) 470 if (!info.hamming && !info.notfound)
476 { 471 {
477 t->is_searching[req->pgbuf] = FALSE; 472 t->is_searching[req->pgbuf] = false;
478 } 473 }
479 return 0; 474 return 0;
480 } 475 }
@@ -530,8 +525,8 @@ static int do_saa5249_ioctl(struct inode *inode, struct file *file,
530 525
531 if (req->pgbuf < 0 || req->pgbuf >= NUM_DAUS) 526 if (req->pgbuf < 0 || req->pgbuf >= NUM_DAUS)
532 return -EINVAL; 527 return -EINVAL;
533 t->vdau[req->pgbuf].stopped = TRUE; 528 t->vdau[req->pgbuf].stopped = true;
534 t->is_searching[req->pgbuf] = FALSE; 529 t->is_searching[req->pgbuf] = false;
535 return 0; 530 return 0;
536 } 531 }
537 532
@@ -660,11 +655,11 @@ static int saa5249_open(struct inode *inode, struct file *file)
660 memset(t->vdau[pgbuf].sregs, 0, sizeof(t->vdau[0].sregs)); 655 memset(t->vdau[pgbuf].sregs, 0, sizeof(t->vdau[0].sregs));
661 memset(t->vdau[pgbuf].laststat, 0, sizeof(t->vdau[0].laststat)); 656 memset(t->vdau[pgbuf].laststat, 0, sizeof(t->vdau[0].laststat));
662 t->vdau[pgbuf].expire = 0; 657 t->vdau[pgbuf].expire = 0;
663 t->vdau[pgbuf].clrfound = TRUE; 658 t->vdau[pgbuf].clrfound = true;
664 t->vdau[pgbuf].stopped = TRUE; 659 t->vdau[pgbuf].stopped = true;
665 t->is_searching[pgbuf] = FALSE; 660 t->is_searching[pgbuf] = false;
666 } 661 }
667 t->virtual_mode=FALSE; 662 t->virtual_mode = false;
668 return 0; 663 return 0;
669 664
670 fail: 665 fail: