diff options
Diffstat (limited to 'drivers/video/platinumfb.c')
-rw-r--r-- | drivers/video/platinumfb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index fdb33cd21a27..233871655824 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/of_device.h> | 36 | #include <asm/of_device.h> |
37 | #include <asm/of_platform.h> | ||
37 | 38 | ||
38 | #include "macmodes.h" | 39 | #include "macmodes.h" |
39 | #include "platinumfb.h" | 40 | #include "platinumfb.h" |
@@ -626,6 +627,9 @@ static int __devinit platinumfb_probe(struct of_device* odev, | |||
626 | 627 | ||
627 | rc = platinum_init_fb(info); | 628 | rc = platinum_init_fb(info); |
628 | if (rc != 0) { | 629 | if (rc != 0) { |
630 | iounmap(pinfo->frame_buffer); | ||
631 | iounmap(pinfo->platinum_regs); | ||
632 | iounmap(pinfo->cmap_regs); | ||
629 | dev_set_drvdata(&odev->dev, NULL); | 633 | dev_set_drvdata(&odev->dev, NULL); |
630 | framebuffer_release(info); | 634 | framebuffer_release(info); |
631 | } | 635 | } |
@@ -682,14 +686,14 @@ static int __init platinumfb_init(void) | |||
682 | return -ENODEV; | 686 | return -ENODEV; |
683 | platinumfb_setup(option); | 687 | platinumfb_setup(option); |
684 | #endif | 688 | #endif |
685 | of_register_driver(&platinum_driver); | 689 | of_register_platform_driver(&platinum_driver); |
686 | 690 | ||
687 | return 0; | 691 | return 0; |
688 | } | 692 | } |
689 | 693 | ||
690 | static void __exit platinumfb_exit(void) | 694 | static void __exit platinumfb_exit(void) |
691 | { | 695 | { |
692 | of_unregister_driver(&platinum_driver); | 696 | of_unregister_platform_driver(&platinum_driver); |
693 | } | 697 | } |
694 | 698 | ||
695 | MODULE_LICENSE("GPL"); | 699 | MODULE_LICENSE("GPL"); |