diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-07-14 16:28:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-07-14 18:34:46 -0400 |
commit | 53ffe3b440aa85af6fc4eda09b2d44bcdd312d4d (patch) | |
tree | e3ee2f392c5f73c855367cee998fc2e5774fa267 /drivers/video/pxafb.c | |
parent | f0006314d37639714da9658cf4ff3f1f9f420764 (diff) | |
parent | cabb352a6455c3550f157909196845f533b0f374 (diff) |
[ARM] Merge most of the PXA work for initial merge
This includes PXA work up to the SPI changes for the initial merge,
since e172274ccc55d20536fbdceb6131f38e288541e0 depends on the SPI
tree being merged.
Conflicts:
arch/arm/configs/em_x270_defconfig
arch/arm/configs/xm_x270_defconfig
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r-- | drivers/video/pxafb.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index fafe7db20d6d..d0746261c957 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -1792,11 +1792,49 @@ failed: | |||
1792 | return ret; | 1792 | return ret; |
1793 | } | 1793 | } |
1794 | 1794 | ||
1795 | static int __devexit pxafb_remove(struct platform_device *dev) | ||
1796 | { | ||
1797 | struct pxafb_info *fbi = platform_get_drvdata(dev); | ||
1798 | struct resource *r; | ||
1799 | int irq; | ||
1800 | struct fb_info *info; | ||
1801 | |||
1802 | if (!fbi) | ||
1803 | return 0; | ||
1804 | |||
1805 | info = &fbi->fb; | ||
1806 | |||
1807 | unregister_framebuffer(info); | ||
1808 | |||
1809 | pxafb_disable_controller(fbi); | ||
1810 | |||
1811 | if (fbi->fb.cmap.len) | ||
1812 | fb_dealloc_cmap(&fbi->fb.cmap); | ||
1813 | |||
1814 | irq = platform_get_irq(dev, 0); | ||
1815 | free_irq(irq, fbi); | ||
1816 | |||
1817 | dma_free_writecombine(&dev->dev, fbi->map_size, | ||
1818 | fbi->map_cpu, fbi->map_dma); | ||
1819 | |||
1820 | iounmap(fbi->mmio_base); | ||
1821 | |||
1822 | r = platform_get_resource(dev, IORESOURCE_MEM, 0); | ||
1823 | release_mem_region(r->start, r->end - r->start + 1); | ||
1824 | |||
1825 | clk_put(fbi->clk); | ||
1826 | kfree(fbi); | ||
1827 | |||
1828 | return 0; | ||
1829 | } | ||
1830 | |||
1795 | static struct platform_driver pxafb_driver = { | 1831 | static struct platform_driver pxafb_driver = { |
1796 | .probe = pxafb_probe, | 1832 | .probe = pxafb_probe, |
1833 | .remove = pxafb_remove, | ||
1797 | .suspend = pxafb_suspend, | 1834 | .suspend = pxafb_suspend, |
1798 | .resume = pxafb_resume, | 1835 | .resume = pxafb_resume, |
1799 | .driver = { | 1836 | .driver = { |
1837 | .owner = THIS_MODULE, | ||
1800 | .name = "pxa2xx-fb", | 1838 | .name = "pxa2xx-fb", |
1801 | }, | 1839 | }, |
1802 | }; | 1840 | }; |
@@ -1809,7 +1847,13 @@ static int __init pxafb_init(void) | |||
1809 | return platform_driver_register(&pxafb_driver); | 1847 | return platform_driver_register(&pxafb_driver); |
1810 | } | 1848 | } |
1811 | 1849 | ||
1850 | static void __exit pxafb_exit(void) | ||
1851 | { | ||
1852 | platform_driver_unregister(&pxafb_driver); | ||
1853 | } | ||
1854 | |||
1812 | module_init(pxafb_init); | 1855 | module_init(pxafb_init); |
1856 | module_exit(pxafb_exit); | ||
1813 | 1857 | ||
1814 | MODULE_DESCRIPTION("loadable framebuffer driver for PXA"); | 1858 | MODULE_DESCRIPTION("loadable framebuffer driver for PXA"); |
1815 | MODULE_LICENSE("GPL"); | 1859 | MODULE_LICENSE("GPL"); |