|
@@ -66,8 +66,15 @@ static int simplefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void simplefb_destroy(struct fb_info *info)
|
|
|
+{
|
|
|
+ if (info->screen_base)
|
|
|
+ iounmap(info->screen_base);
|
|
|
+}
|
|
|
+
|
|
|
static struct fb_ops simplefb_ops = {
|
|
|
.owner = THIS_MODULE,
|
|
|
+ .fb_destroy = simplefb_destroy,
|
|
|
.fb_setcolreg = simplefb_setcolreg,
|
|
|
.fb_fillrect = cfb_fillrect,
|
|
|
.fb_copyarea = cfb_copyarea,
|
|
@@ -212,8 +219,8 @@ static int simplefb_probe(struct platform_device *pdev)
|
|
|
|
|
|
info->fbops = &simplefb_ops;
|
|
|
info->flags = FBINFO_DEFAULT | FBINFO_MISC_FIRMWARE;
|
|
|
- info->screen_base = devm_ioremap(&pdev->dev, info->fix.smem_start,
|
|
|
- info->fix.smem_len);
|
|
|
+ info->screen_base = ioremap(info->fix.smem_start,
|
|
|
+ info->fix.smem_len);
|
|
|
if (!info->screen_base) {
|
|
|
framebuffer_release(info);
|
|
|
return -ENODEV;
|
|
@@ -231,6 +238,7 @@ static int simplefb_probe(struct platform_device *pdev)
|
|
|
ret = register_framebuffer(info);
|
|
|
if (ret < 0) {
|
|
|
dev_err(&pdev->dev, "Unable to register simplefb: %d\n", ret);
|
|
|
+ iounmap(info->screen_base);
|
|
|
framebuffer_release(info);
|
|
|
return ret;
|
|
|
}
|