aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-24 12:53:18 -0500
committerAdrian Bunk <bunk@stusta.de>2006-03-24 12:53:18 -0500
commit232443e2c90cc2930624dec89df327615b002c55 (patch)
tree8bb1fa4c9aed6e020a8ecdb7f340ee329e2815e5
parentb74945547f0679003ede4d1afcd0aa169059a436 (diff)
BUG_ON() Conversion in drivers/video/
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--drivers/video/bw2.c3
-rw-r--r--drivers/video/ffb.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index c029db4646f..6577fdfdfc1 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -327,8 +327,7 @@ static void bw2_init_one(struct sbus_dev *sdev)
327 } else 327 } else
328#else 328#else
329 { 329 {
330 if (!sdev) 330 BUG_ON(!sdev);
331 BUG();
332 all->par.physbase = sdev->reg_addrs[0].phys_addr; 331 all->par.physbase = sdev->reg_addrs[0].phys_addr;
333 resp = &sdev->resource[0]; 332 resp = &sdev->resource[0];
334 sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); 333 sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1);
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 9c9b21d469a..7633e41adda 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -466,8 +466,7 @@ static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
466 unsigned long flags; 466 unsigned long flags;
467 u32 fg; 467 u32 fg;
468 468
469 if (rect->rop != ROP_COPY && rect->rop != ROP_XOR) 469 BUG_ON(rect->rop != ROP_COPY && rect->rop != ROP_XOR);
470 BUG();
471 470
472 fg = ((u32 *)info->pseudo_palette)[rect->color]; 471 fg = ((u32 *)info->pseudo_palette)[rect->color];
473 472