Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-19 05:03:02 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-19 05:03:02 +0400
commit0a582821d4f8edf41d9b56ae057ee2002fc275f0 (patch)
tree199f0de91106f143c4ec62b6a8598383b422205b /drivers/video/fbdev/msm/msm_fb.c
parent8a5de18239e418fe7b1f36504834689f754d8ccc (diff)
parent33ac9dba859b07d40e9ec826057d20c857fdede5 (diff)
Merge tag 'fbdev-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev updates from Tomi Valkeinen: - new 6x10 font - various small fixes and cleanups * tag 'fbdev-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (30 commits) fonts: Add 6x10 font videomode: provide dummy inline functions for !CONFIG_OF video/atmel_lcdfb: Introduce regulator support fbdev: sh_mobile_hdmi: Re-init regs before irq re-enable on resume framebuffer: fix screen corruption when copying framebuffer: fix border color arm, fbdev, omap2, LLVMLinux: Remove nested function from omapfb arm, fbdev, omap2, LLVMLinux: Remove nested function from omap2 dss video: fbdev: valkyriefb.c: use container_of to resolve fb_info_valkyrie from fb_info video: fbdev: pxafb.c: use container_of to resolve pxafb_info/layer from fb_info video: fbdev: cyber2000fb.c: use container_of to resolve cfb_info from fb_info video: fbdev: controlfb.c: use container_of to resolve fb_info_control from fb_info video: fbdev: sa1100fb.c: use container_of to resolve sa1100fb_info from fb_info video: fbdev: stifb.c: use container_of to resolve stifb_info from fb_info video: fbdev: sis: sis_main.c: Cleaning up missing null-terminate in conjunction with strncpy video: valkyriefb: Fix unused variable warning in set_valkyrie_clock() video: fbdev: use %*ph specifier to dump small buffers video: mx3fb: always enable BACKLIGHT_LCD_SUPPORT video: fbdev: au1200fb: delete double assignment video: fbdev: sis: delete double assignment ...
Diffstat (limited to 'drivers/video/fbdev/msm/msm_fb.c')
-rw-r--r--drivers/video/fbdev/msm/msm_fb.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/msm_fb.c b/drivers/video/fbdev/msm/msm_fb.c
index 1374803fbcd9..2979d7e72126 100644
--- a/drivers/video/fbdev/msm/msm_fb.c
+++ b/drivers/video/fbdev/msm/msm_fb.c
@@ -569,8 +569,13 @@ static int msmfb_probe(struct platform_device *pdev)
mutex_init(&msmfb->panel_init_lock);
init_waitqueue_head(&msmfb->frame_wq);
INIT_WORK(&msmfb->resume_work, power_on_panel);
- msmfb->black = kzalloc(msmfb->fb->var.bits_per_pixel*msmfb->xres,
- GFP_KERNEL);
+ msmfb->black = devm_kzalloc(&pdev->dev,
+ msmfb->fb->var.bits_per_pixel*msmfb->xres,
+ GFP_KERNEL);
+ if (!msmfb->black) {
+ ret = -ENOMEM;
+ goto error_register_framebuffer;
+ }
printk(KERN_INFO "msmfb_probe() installing %d x %d panel\n",
msmfb->xres, msmfb->yres);
@@ -589,6 +594,8 @@ static int msmfb_probe(struct platform_device *pdev)
msmfb->sleeping = WAKING;
+ platform_set_drvdata(pdev, msmfb);
+
return 0;
error_register_framebuffer:
@@ -598,9 +605,23 @@ error_setup_fbmem:
return ret;
}
+static int msmfb_remove(struct platform_device *pdev)
+{
+ struct msmfb_info *msmfb;
+
+ msmfb = platform_get_drvdata(pdev);
+
+ unregister_framebuffer(msmfb->fb);
+ iounmap(msmfb->fb->screen_base);
+ framebuffer_release(msmfb->fb);
+
+ return 0;
+}
+
static struct platform_driver msm_panel_driver = {
/* need to write remove */
.probe = msmfb_probe,
+ .remove = msmfb_remove,
.driver = {.name = "msm_panel"},
};