summaryrefslogtreecommitdiffstats
path: root/drivers/video/pxafb.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2009-03-23 02:55:09 +0100
committerEric Miao <eric.miao@marvell.com>2009-03-23 02:55:14 +0100
commitfa12868e59f5f49bc42b8befd94c531bb07ec120 (patch)
tree25984e5d3941f37a72a5cd4ef8a6bafcaccc86a3 /drivers/video/pxafb.c
parent[ARM] pxa/MioA701: Migrate after pxa27x_udc gpio_pullup functionality. (diff)
parent[ARM] pxa: add pxa320 missing pin function for CS2 on GPIO3 (diff)
downloadlinux-fa12868e59f5f49bc42b8befd94c531bb07ec120.tar.xz
linux-fa12868e59f5f49bc42b8befd94c531bb07ec120.zip
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git into devel
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r--drivers/video/pxafb.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 287aa1d2a13c..81c8bd5eca8e 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -882,10 +882,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);
@@ -908,6 +919,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);
}