diff options
-rw-r--r-- | drivers/video/macfb.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index 80a043807161..180d94c2b4d2 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c | |||
@@ -608,6 +608,22 @@ void __init macfb_setup(char *options) | |||
608 | } | 608 | } |
609 | } | 609 | } |
610 | 610 | ||
611 | static void __init iounmap_macfb(void) | ||
612 | { | ||
613 | if (valkyrie_cmap_regs) | ||
614 | iounmap(valkyrie_cmap_regs); | ||
615 | if (dafb_cmap_regs) | ||
616 | iounmap(dafb_cmap_regs); | ||
617 | if (v8_brazil_cmap_regs) | ||
618 | iounmap(v8_brazil_cmap_regs); | ||
619 | if (rbv_cmap_regs) | ||
620 | iounmap(rbv_cmap_regs); | ||
621 | if (civic_cmap_regs) | ||
622 | iounmap(civic_cmap_regs); | ||
623 | if (csc_cmap_regs) | ||
624 | iounmap(csc_cmap_regs); | ||
625 | } | ||
626 | |||
611 | static int __init macfb_init(void) | 627 | static int __init macfb_init(void) |
612 | { | 628 | { |
613 | int video_cmap_len, video_is_nubus = 0; | 629 | int video_cmap_len, video_is_nubus = 0; |
@@ -962,6 +978,10 @@ static int __init macfb_init(void) | |||
962 | if (!err) | 978 | if (!err) |
963 | printk("fb%d: %s frame buffer device\n", | 979 | printk("fb%d: %s frame buffer device\n", |
964 | fb_info.node, fb_info.fix.id); | 980 | fb_info.node, fb_info.fix.id); |
981 | else { | ||
982 | iounmap(fb_info.screen_base); | ||
983 | iounmap_macfb(); | ||
984 | } | ||
965 | return err; | 985 | return err; |
966 | } | 986 | } |
967 | 987 | ||