diff options
author | Eric Miao <eric.miao@marvell.com> | 2009-03-19 15:24:30 +0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-02 13:55:17 -0700 |
commit | 7549374c394bd35a343f3f85f95d93af962be643 (patch) | |
tree | 61d3b75ca37daf070af73be2b9c68fb372ab5bda | |
parent | f27eae2ce95d388ebea30853730d1ec76f07a41c (diff) |
ARM: pxa: fix overlay being un-necessarily initialized on pxa25x
upstream commit: 782385ae176b304c7105051e1b06c68bc0b4a2ba
pxa25x doesn't support overlay in its LCD controller, this patch adds
pxafb_overlay_supported() functions to check the initialization is
necessary.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | drivers/video/pxafb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 2552b9f325e..642c1d47178 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c @@ -883,10 +883,21 @@ static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, init_completion(&ofb->branch_done); } +static inline int pxafb_overlay_supported(void) +{ + if (cpu_is_pxa27x() || cpu_is_pxa3xx()) + return 1; + + return 0; +} + static int __devinit pxafb_overlay_init(struct pxafb_info *fbi) { int i, ret; + if (!pxafb_overlay_supported()) + return 0; + for (i = 0; i < 2; i++) { init_pxafb_overlay(fbi, &fbi->overlay[i], i); ret = register_framebuffer(&fbi->overlay[i].fb); @@ -909,6 +920,9 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) { int i; + if (!pxafb_overlay_supported()) + return; + for (i = 0; i < 2; i++) unregister_framebuffer(&fbi->overlay[i].fb); } |