]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/pxafb.c
Merge branch 'next-s3c64xx-regs' of git://aeryn.fluff.org.uk/bjdooks/linux into devel
[linux-2.6-omap-h63xx.git] / drivers / video / pxafb.c
index 2552b9f325ee9b4c33eea202329e23e47b544c3e..84f63205c46d1478ea4519e21b87f404caa6988d 100644 (file)
@@ -59,7 +59,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/div64.h>
-#include <mach/pxa-regs.h>
 #include <mach/bitfield.h>
 #include <mach/pxafb.h>
 
@@ -883,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);
@@ -909,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);
 }