We reserve some memory in efifb_probe that needs to be freed when we
handoff to a KMS driver. Also unmap the ioremap() done during
probe/setup.
---
drivers/video/efifb.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index eb12182..41ba8cc 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -135,6 +135,14 @@ static int set_system(const struct dmi_system_id *id)
return 0;
}
+static int efifb_destroy(struct fb_info *info)
+{
+ if (info->screen_base)
+ iounmap(info->screen_base);
+ release_mem_region(info->aperture_base, info->aperture_size);
+ framebuffer_release(info);
+}
+
static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp,
struct fb_info *info)
@@ -163,6 +171,7 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
static struct fb_ops efifb_ops = {
.owner = THIS_MODULE,
+ .fb_destroy = efifb_destroy,
.fb_setcolreg = efifb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
--
1.6.2.2
|