aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2009-03-22 21:55:09 -0400
committerEric Miao <eric.miao@marvell.com>2009-03-22 21:55:14 -0400
commitfa12868e59f5f49bc42b8befd94c531bb07ec120 (patch)
tree25984e5d3941f37a72a5cd4ef8a6bafcaccc86a3 /drivers/video
parentcefdb2a4436ec83b4c8b349aa30f976d30c22e25 (diff)
parent1efb71809fd47bc19b3ce05080e1d5085a8dfab1 (diff)
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')
-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,
882 init_completion(&ofb->branch_done); 882 init_completion(&ofb->branch_done);
883} 883}
884 884
885static inline int pxafb_overlay_supported(void)
886{
887 if (cpu_is_pxa27x() || cpu_is_pxa3xx())
888 return 1;
889
890 return 0;
891}
892
885static int __devinit pxafb_overlay_init(struct pxafb_info *fbi) 893static int __devinit pxafb_overlay_init(struct pxafb_info *fbi)
886{ 894{
887 int i, ret; 895 int i, ret;
888 896
897 if (!pxafb_overlay_supported())
898 return 0;
899
889 for (i = 0; i < 2; i++) { 900 for (i = 0; i < 2; i++) {
890 init_pxafb_overlay(fbi, &fbi->overlay[i], i); 901 init_pxafb_overlay(fbi, &fbi->overlay[i], i);
891 ret = register_framebuffer(&fbi->overlay[i].fb); 902 ret = register_framebuffer(&fbi->overlay[i].fb);
@@ -908,6 +919,9 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi)
908{ 919{
909 int i; 920 int i;
910 921
922 if (!pxafb_overlay_supported())
923 return;
924
911 for (i = 0; i < 2; i++) 925 for (i = 0; i < 2; i++)
912 unregister_framebuffer(&fbi->overlay[i].fb); 926 unregister_framebuffer(&fbi->overlay[i].fb);
913} 927}