diff options
author | Alison Wang <b18965@freescale.com> | 2012-08-10 09:37:21 +0800 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2012-09-12 16:50:01 -0400 |
commit | 916ef83576b29c6019c1c31dbcb155301ac4a75f (patch) | |
tree | bef4b43bdd8047f55144a73d9aeff73d79453d8c | |
parent | a444d8a409bfd084a83b33cffc9262b60ba2204f (diff) |
ENGR00219495: dcu: Fix module reinsert error for DCU driver
Signed-off-by: Alison Wang <b18965@freescale.com>
-rw-r--r-- | drivers/video/mvf_dcu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/mvf_dcu.c b/drivers/video/mvf_dcu.c index bbef884e9570..cc4fb6c429a4 100644 --- a/drivers/video/mvf_dcu.c +++ b/drivers/video/mvf_dcu.c @@ -648,9 +648,8 @@ static int mvf_dcu_ioctl(struct fb_info *info, unsigned int cmd, struct mfb_info *mfbi = info->par; struct dcu_layer_desc *layer_desc = mfbi->layer_desc; struct layer_display_offset layer_d; - struct mvf_dcu_fb_data *dcu = mfbi->parent; void __user *buf = (void __user *)arg; - unsigned char global_alpha, value; + unsigned char global_alpha; if (!arg) return -EINVAL; @@ -1027,12 +1026,18 @@ failed_alloc_framebuffer: static int mvf_dcu_remove(struct platform_device *pdev) { struct mvf_dcu_fb_data *dcu = dev_get_drvdata(&pdev->dev); + struct resource *res; int i; disable_lcdc(dcu->mvf_dcu_info[0]); free_irq_local(dcu->irq, dcu); clk_disable(dcu->clk); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENODEV; + release_mem_region(res->start, resource_size(res)); + for (i = ARRAY_SIZE(dcu->mvf_dcu_info); i > 0; i--) uninstall_fb(dcu->mvf_dcu_info[i - 1]); |