summaryrefslogtreecommitdiff
path: root/drivers/video/cg3.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/cg3.c
parent1bd4b280394cdd14f82efc00808c6d77b097285a (diff)
downloadlinux-next-6c8f5b90bfbe69a27763fb0e181bd2465181446d.tar.gz
[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/cg3.c')
-rw-r--r--drivers/video/cg3.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index 5741b46ade1b..a5c7fb331527 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -315,7 +315,7 @@ static u_char cg3_dacvals[] __devinitdata = {
4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0
};
-static void __devinit cg3_do_default_mode(struct cg3_par *par)
+static int __devinit cg3_do_default_mode(struct cg3_par *par)
{
enum cg3_type type;
u8 *p;
@@ -332,10 +332,9 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par)
else
type = CG3_AT_66HZ;
} else {
- prom_printf("cgthree: can't handle SR %02x\n",
- status);
- prom_halt();
- return;
+ printk(KERN_ERR "cgthree: can't handle SR %02x\n",
+ status);
+ return -EINVAL;
}
}
@@ -351,6 +350,7 @@ static void __devinit cg3_do_default_mode(struct cg3_par *par)
regp = (u8 __iomem *)&par->regs->cmap.control;
sbus_writeb(p[1], regp);
}
+ return 0;
}
static int __devinit cg3_probe(struct of_device *op,
@@ -400,8 +400,11 @@ static int __devinit cg3_probe(struct of_device *op,
cg3_blank(0, info);
- if (!of_find_property(dp, "width", NULL))
- cg3_do_default_mode(par);
+ if (!of_find_property(dp, "width", NULL)) {
+ err = cg3_do_default_mode(par);
+ if (err)
+ goto out_unmap_screen;
+ }
if (fb_alloc_cmap(&info->cmap, 256, 0))
goto out_unmap_screen;