aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/pxafb.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 3ee314beacc1..3682bbd7e50e 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1777,11 +1777,49 @@ failed:
1777 return ret; 1777 return ret;
1778} 1778}
1779 1779
1780static int __devexit pxafb_remove(struct platform_device *dev)
1781{
1782 struct pxafb_info *fbi = platform_get_drvdata(dev);
1783 struct resource *r;
1784 int irq;
1785 struct fb_info *info;
1786
1787 if (!fbi)
1788 return 0;
1789
1790 info = &fbi->fb;
1791
1792 unregister_framebuffer(info);
1793
1794 pxafb_disable_controller(fbi);
1795
1796 if (fbi->fb.cmap.len)
1797 fb_dealloc_cmap(&fbi->fb.cmap);
1798
1799 irq = platform_get_irq(dev, 0);
1800 free_irq(irq, fbi);
1801
1802 dma_free_writecombine(&dev->dev, fbi->map_size,
1803 fbi->map_cpu, fbi->map_dma);
1804
1805 iounmap(fbi->mmio_base);
1806
1807 r = platform_get_resource(dev, IORESOURCE_MEM, 0);
1808 release_mem_region(r->start, r->end - r->start + 1);
1809
1810 clk_put(fbi->clk);
1811 kfree(fbi);
1812
1813 return 0;
1814}
1815
1780static struct platform_driver pxafb_driver = { 1816static struct platform_driver pxafb_driver = {
1781 .probe = pxafb_probe, 1817 .probe = pxafb_probe,
1818 .remove = pxafb_remove,
1782 .suspend = pxafb_suspend, 1819 .suspend = pxafb_suspend,
1783 .resume = pxafb_resume, 1820 .resume = pxafb_resume,
1784 .driver = { 1821 .driver = {
1822 .owner = THIS_MODULE,
1785 .name = "pxa2xx-fb", 1823 .name = "pxa2xx-fb",
1786 }, 1824 },
1787}; 1825};
@@ -1794,7 +1832,13 @@ static int __devinit pxafb_init(void)
1794 return platform_driver_register(&pxafb_driver); 1832 return platform_driver_register(&pxafb_driver);
1795} 1833}
1796 1834
1835static void __exit pxafb_exit(void)
1836{
1837 platform_driver_unregister(&pxafb_driver);
1838}
1839
1797module_init(pxafb_init); 1840module_init(pxafb_init);
1841module_exit(pxafb_exit);
1798 1842
1799MODULE_DESCRIPTION("loadable framebuffer driver for PXA"); 1843MODULE_DESCRIPTION("loadable framebuffer driver for PXA");
1800MODULE_LICENSE("GPL"); 1844MODULE_LICENSE("GPL");