summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 10:06:39 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 18:09:05 +0100
commited1705afb93409a3e345d653be9d263984aa5c1b (patch)
tree8184e459ba4f532de1339157f0e3a1236c0722d3 /drivers/video
parent[PATCH] m68k: fix reference to init_task in vmlinux-sun3.lds (diff)
downloadlinux-ed1705afb93409a3e345d653be9d263984aa5c1b.tar.xz
linux-ed1705afb93409a3e345d653be9d263984aa5c1b.zip
[PATCH] m68k: fix macfb init
To be used by module_init() function should return int; same for functions that have "return -ENODEV;" in them, actually ;-) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/macfb.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
index cfc748e94272..e6cbd9de944a 100644
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -609,18 +609,19 @@ void __init macfb_setup(char *options)
}
}
-void __init macfb_init(void)
+static int __init macfb_init(void)
{
int video_cmap_len, video_is_nubus = 0;
struct nubus_dev* ndev = NULL;
char *option = NULL;
+ int err;
if (fb_get_options("macfb", &option))
return -ENODEV;
macfb_setup(option);
if (!MACH_IS_MAC)
- return;
+ return -ENODEV;
/* There can only be one internal video controller anyway so
we're not too worried about this */
@@ -958,11 +959,11 @@ void __init macfb_init(void)
fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
- if (register_framebuffer(&fb_info) < 0)
- return;
-
- printk("fb%d: %s frame buffer device\n",
- fb_info.node, fb_info.fix.id);
+ err = register_framebuffer(&fb_info);
+ if (!err)
+ printk("fb%d: %s frame buffer device\n",
+ fb_info.node, fb_info.fix.id);
+ return err;
}
module_init(macfb_init);