[PATCH] pxa168fb: Add .remove function
Eric Miao
eric.y.miao at gmail.com
Sun Sep 5 07:08:47 EDT 2010
On Tue, Aug 31, 2010 at 1:43 AM, Marek Vasut <marek.vasut at gmail.com> wrote:
> Dne Po 30. srpna 2010 02:32:16 Haojian Zhuang napsal(a):
>> The pxa168fb driver is missing .remove function so the framebuffer isn't
>> correctly shut down when the module is removed.
>>
>> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
>> Signed-off-by: Haojian Zhuang <haojian.zhuang at marvell.com>
>> ---
>> drivers/video/pxa168fb.c | 47
>> ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47
>> insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
>> index c91a7f7..ec2ddb2 100644
>> --- a/drivers/video/pxa168fb.c
>> +++ b/drivers/video/pxa168fb.c
>> @@ -784,12 +784,53 @@ failed:
>> return ret;
>> }
>>
>> +static int __devexit pxa168fb_remove(struct platform_device *pdev)
>> +{
>> + struct pxa168fb_info *fbi = platform_get_drvdata(pdev);
>> + struct fb_info *info;
>> + int irq;
>> + unsigned int data;
>> +
>> + if (!fbi)
>> + return 0;
>> +
>> + /* disable DMA transfer */
>> + data = readl(fbi->reg_base + LCD_SPU_DMA_CTRL0);
>> + data &= ~CFG_GRA_ENA_MASK;
>> + writel(data, fbi->reg_base + LCD_SPU_DMA_CTRL0);
>> +
>> + info = fbi->info;
>> +
>> + unregister_framebuffer(info);
>> +
>
> Haojian, is this line below correct?
>
> If so, for this modified version, find my:
>
> Acked-by: Marek Vasut <marek.vasut at gmail.com>
>
Applied to 'devel'.
More information about the linux-arm-kernel
mailing list