[PATCH] glamo-fb: unmap/free everything mapped/allocated

Thibaut Girka thib at sitedethib.com
Tue Jun 22 00:11:31 CEST 2010


---
 drivers/mfd/glamo/glamo-fb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index 29c16f0..24ff328 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -241,7 +241,7 @@ static void reg_set_bit_mask(struct glamofb_handle *glamo,
 #define GLAMO_LCD_HV_RETR_DISP_START_MASK 0x03FF
 #define GLAMO_LCD_HV_RETR_DISP_END_MASK 0x03FF
 
-/* the caller has to enxure lock_cmd is held and we are in cmd mode */
+/* the caller has to ensure lock_cmd is held and we are in cmd mode */
 static void __rotate_lcd(struct glamofb_handle *glamo, __u32 rotation)
 {
 	int glamo_rot;
@@ -895,7 +895,10 @@ static int glamofb_remove(struct platform_device *pdev)
 	struct glamofb_handle *glamofb = platform_get_drvdata(pdev);
 
 	platform_set_drvdata(pdev, NULL);
+	iounmap(glamofb->fb->screen_base);
 	iounmap(glamofb->base);
+	release_mem_region(glamofb->fb_res->start,
+				resource_size(glamofb->fb_res));
 	release_mem_region(glamofb->reg->start, resource_size(glamofb->reg));
 
 	framebuffer_release(glamofb->fb);
-- 
1.7.1




More information about the openmoko-kernel mailing list