summaryrefslogtreecommitdiffstats
path: root/drivers/video/bw2.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-08-24 22:33:15 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-26 18:49:08 -0700
commit6c8f5b90bfbe69a27763fb0e181bd2465181446d (patch)
treebb62f00ccd9ab1472446831f9e1442ad6bb86f47 /drivers/video/bw2.c
parent1bd4b280394cdd14f82efc00808c6d77b097285a (diff)
downloadlinux-6c8f5b90bfbe69a27763fb0e181bd2465181446d.tar.gz
linux-6c8f5b90bfbe69a27763fb0e181bd2465181446d.tar.bz2
linux-6c8f5b90bfbe69a27763fb0e181bd2465181446d.zip
[VIDEO]: Do not prom_halt() in cg3 and bw2 device probe.
Just give a normal kernel log message of the problem and return failure. Based upon a patch from Mark Fortescue. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/video/bw2.c')
-rw-r--r--drivers/video/bw2.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index 718b9f83736e..833b10c84064 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -233,9 +233,9 @@ static u8 bw2regs_66hz[] __devinitdata = {
0x10, 0x20, 0
};
-static void __devinit bw2_do_default_mode(struct bw2_par *par,
- struct fb_info *info,
- int *linebytes)
+static int __devinit bw2_do_default_mode(struct bw2_par *par,
+ struct fb_info *info,
+ int *linebytes)
{
u8 status, mon;
u8 *p;
@@ -266,17 +266,18 @@ static void __devinit bw2_do_default_mode(struct bw2_par *par,
break;
case BWTWO_SR_ID_NOCONN:
- return;
+ return 0;
default:
- prom_printf("bw2: can't handle SR %02x\n",
- status);
- prom_halt();
+ printk(KERN_ERR "bw2: can't handle SR %02x\n",
+ status);
+ return -EINVAL;
}
for ( ; *p; p += 2) {
u8 __iomem *regp = &((u8 __iomem *)par->regs)[p[0]];
sbus_writeb(p[1], regp);
}
+ return 0;
}
static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match)
@@ -312,8 +313,11 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
if (!par->regs)
goto out_release_fb;
- if (!of_find_property(dp, "width", NULL))
- bw2_do_default_mode(par, info, &linebytes);
+ if (!of_find_property(dp, "width", NULL)) {
+ err = bw2_do_default_mode(par, info, &linebytes);
+ if (err)
+ goto out_unmap_regs;
+ }
par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);