aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/Makefile1
-rw-r--r--arch/i386/video/Makefile1
-rw-r--r--arch/i386/video/fbdev.c34
-rw-r--r--include/asm-alpha/fb.h6
-rw-r--r--include/asm-arm/fb.h6
-rw-r--r--include/asm-arm26/fb.h6
-rw-r--r--include/asm-avr32/fb.h6
-rw-r--r--include/asm-blackfin/fb.h6
-rw-r--r--include/asm-cris/fb.h6
-rw-r--r--include/asm-frv/fb.h6
-rw-r--r--include/asm-h8300/fb.h6
-rw-r--r--include/asm-i386/fb.h3
-rw-r--r--include/asm-ia64/fb.h6
-rw-r--r--include/asm-m32r/fb.h6
-rw-r--r--include/asm-m68k/fb.h6
-rw-r--r--include/asm-m68knommu/fb.h6
-rw-r--r--include/asm-mips/fb.h6
-rw-r--r--include/asm-parisc/fb.h6
-rw-r--r--include/asm-powerpc/fb.h6
-rw-r--r--include/asm-s390/fb.h6
-rw-r--r--include/asm-sh/fb.h6
-rw-r--r--include/asm-sh64/fb.h6
-rw-r--r--include/asm-sparc/fb.h6
-rw-r--r--include/asm-sparc64/fb.h6
-rw-r--r--include/asm-v850/fb.h6
-rw-r--r--include/asm-x86_64/fb.h7
-rw-r--r--include/asm-xtensa/fb.h6
27 files changed, 177 insertions, 1 deletions
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index bd28f9f9b4b7..181cc29a7c4f 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -108,6 +108,7 @@ drivers-$(CONFIG_PCI) += arch/i386/pci/
108# must be linked after kernel/ 108# must be linked after kernel/
109drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/ 109drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/
110drivers-$(CONFIG_PM) += arch/i386/power/ 110drivers-$(CONFIG_PM) += arch/i386/power/
111drivers-$(CONFIG_FB) += arch/i386/video/
111 112
112CFLAGS += $(mflags-y) 113CFLAGS += $(mflags-y)
113AFLAGS += $(mflags-y) 114AFLAGS += $(mflags-y)
diff --git a/arch/i386/video/Makefile b/arch/i386/video/Makefile
new file mode 100644
index 000000000000..2c447c94adcc
--- /dev/null
+++ b/arch/i386/video/Makefile
@@ -0,0 +1 @@
obj-$(CONFIG_FB) += fbdev.o
diff --git a/arch/i386/video/fbdev.c b/arch/i386/video/fbdev.c
new file mode 100644
index 000000000000..7fc712c46a64
--- /dev/null
+++ b/arch/i386/video/fbdev.c
@@ -0,0 +1,34 @@
1/*
2 * arch/i386/video/fbdev.c - i386 Framebuffer
3 *
4 * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 *
10 */
11#include <linux/fb.h>
12#include <linux/pci.h>
13
14int fb_is_primary_device(struct fb_info *info)
15{
16 struct device *device;
17 struct pci_dev *pci_dev = NULL;
18 struct resource *res = NULL;
19 int retval = 0;
20
21 device = info->device;
22
23 if (device)
24 pci_dev = to_pci_dev(device);
25
26 if (pci_dev)
27 res = &pci_dev->resource[PCI_ROM_RESOURCE];
28
29 if (res && res->flags & IORESOURCE_ROM_SHADOW)
30 retval = 1;
31
32 return retval;
33}
34EXPORT_SYMBOL(fb_is_primary_device);
diff --git a/include/asm-alpha/fb.h b/include/asm-alpha/fb.h
index ca714a4e3557..fa9bbb96b2b3 100644
--- a/include/asm-alpha/fb.h
+++ b/include/asm-alpha/fb.h
@@ -1,7 +1,13 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/device.h>
3 4
4/* Caching is off in the I/O space quadrant by design. */ 5/* Caching is off in the I/O space quadrant by design. */
5#define fb_pgprotect(...) do {} while (0) 6#define fb_pgprotect(...) do {} while (0)
6 7
8static inline int fb_is_primary_device(struct fb_info *info)
9{
10 return 0;
11}
12
7#endif /* _ASM_FB_H_ */ 13#endif /* _ASM_FB_H_ */
diff --git a/include/asm-arm/fb.h b/include/asm-arm/fb.h
index 4bf5b88d90bf..d92e99cd8c8a 100644
--- a/include/asm-arm/fb.h
+++ b/include/asm-arm/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -10,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 11 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
11} 12}
12 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
13#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-arm26/fb.h b/include/asm-arm26/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-arm26/fb.h
+++ b/include/asm-arm26/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-avr32/fb.h b/include/asm-avr32/fb.h
index d22a4a876694..41baf84ad402 100644
--- a/include/asm-avr32/fb.h
+++ b/include/asm-avr32/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -12,4 +13,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
12 | (_PAGE_BUFFER | _PAGE_DIRTY)); 13 | (_PAGE_BUFFER | _PAGE_DIRTY));
13} 14}
14 15
16static inline int fb_is_primary_device(struct fb_info *info)
17{
18 return 0;
19}
20
15#endif /* _ASM_FB_H_ */ 21#endif /* _ASM_FB_H_ */
diff --git a/include/asm-blackfin/fb.h b/include/asm-blackfin/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-blackfin/fb.h
+++ b/include/asm-blackfin/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-cris/fb.h b/include/asm-cris/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-cris/fb.h
+++ b/include/asm-cris/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-frv/fb.h b/include/asm-frv/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-frv/fb.h
+++ b/include/asm-frv/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-h8300/fb.h b/include/asm-h8300/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-h8300/fb.h
+++ b/include/asm-h8300/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-i386/fb.h b/include/asm-i386/fb.h
index d30073c75586..d1c6297d4a61 100644
--- a/include/asm-i386/fb.h
+++ b/include/asm-i386/fb.h
@@ -1,9 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
8extern int fb_is_primary_device(struct fb_info *info);
9
7static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, 10static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
8 unsigned long off) 11 unsigned long off)
9{ 12{
diff --git a/include/asm-ia64/fb.h b/include/asm-ia64/fb.h
index 9d4577f9fe0e..89a397cee90a 100644
--- a/include/asm-ia64/fb.h
+++ b/include/asm-ia64/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <linux/efi.h> 6#include <linux/efi.h>
6#include <asm/page.h> 7#include <asm/page.h>
@@ -14,4 +15,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
14 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 15 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
15} 16}
16 17
18static inline int fb_is_primary_device(struct fb_info *info)
19{
20 return 0;
21}
22
17#endif /* _ASM_FB_H_ */ 23#endif /* _ASM_FB_H_ */
diff --git a/include/asm-m32r/fb.h b/include/asm-m32r/fb.h
index 4bf5b88d90bf..d92e99cd8c8a 100644
--- a/include/asm-m32r/fb.h
+++ b/include/asm-m32r/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -10,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 11 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
11} 12}
12 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
13#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-m68k/fb.h b/include/asm-m68k/fb.h
index f78bad476b08..380b97ae8157 100644
--- a/include/asm-m68k/fb.h
+++ b/include/asm-m68k/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6#include <asm/setup.h> 7#include <asm/setup.h>
@@ -25,4 +26,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
25} 26}
26#endif /* CONFIG_SUN3 */ 27#endif /* CONFIG_SUN3 */
27 28
29static inline int fb_is_primary_device(struct fb_info *info)
30{
31 return 0;
32}
33
28#endif /* _ASM_FB_H_ */ 34#endif /* _ASM_FB_H_ */
diff --git a/include/asm-m68knommu/fb.h b/include/asm-m68knommu/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-m68knommu/fb.h
+++ b/include/asm-m68knommu/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-mips/fb.h b/include/asm-mips/fb.h
index ac23d96e261a..bd3f68c9ddfc 100644
--- a/include/asm-mips/fb.h
+++ b/include/asm-mips/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -10,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 11 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
11} 12}
12 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
13#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-parisc/fb.h b/include/asm-parisc/fb.h
index d5e47edf5321..4d503a023ab2 100644
--- a/include/asm-parisc/fb.h
+++ b/include/asm-parisc/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -10,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; 11 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
11} 12}
12 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
13#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-powerpc/fb.h b/include/asm-powerpc/fb.h
index e13d6ebc116d..411af8d17a69 100644
--- a/include/asm-powerpc/fb.h
+++ b/include/asm-powerpc/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -12,4 +13,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
12 vma->vm_page_prot); 13 vma->vm_page_prot);
13} 14}
14 15
16static inline int fb_is_primary_device(struct fb_info *info)
17{
18 return 0;
19}
20
15#endif /* _ASM_FB_H_ */ 21#endif /* _ASM_FB_H_ */
diff --git a/include/asm-s390/fb.h b/include/asm-s390/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-s390/fb.h
+++ b/include/asm-s390/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-sh/fb.h b/include/asm-sh/fb.h
index 4bf5b88d90bf..d92e99cd8c8a 100644
--- a/include/asm-sh/fb.h
+++ b/include/asm-sh/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -10,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 11 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
11} 12}
12 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
13#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-sh64/fb.h b/include/asm-sh64/fb.h
index 4bf5b88d90bf..d92e99cd8c8a 100644
--- a/include/asm-sh64/fb.h
+++ b/include/asm-sh64/fb.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3
4#include <linux/fb.h>
4#include <linux/fs.h> 5#include <linux/fs.h>
5#include <asm/page.h> 6#include <asm/page.h>
6 7
@@ -10,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); 11 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
11} 12}
12 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
13#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-sparc/fb.h
+++ b/include/asm-sparc/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h
index 8703c707e142..d6cd3a175fc3 100644
--- a/include/asm-sparc64/fb.h
+++ b/include/asm-sparc64/fb.h
@@ -1,5 +1,6 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3#include <linux/fs.h> 4#include <linux/fs.h>
4#include <asm/page.h> 5#include <asm/page.h>
5 6
@@ -9,4 +10,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
9 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 10 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
10} 11}
11 12
13static inline int fb_is_primary_device(struct fb_info *info)
14{
15 return 0;
16}
17
12#endif /* _ASM_FB_H_ */ 18#endif /* _ASM_FB_H_ */
diff --git a/include/asm-v850/fb.h b/include/asm-v850/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-v850/fb.h
+++ b/include/asm-v850/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-x86_64/fb.h b/include/asm-x86_64/fb.h
index d30073c75586..60548e651d12 100644
--- a/include/asm-x86_64/fb.h
+++ b/include/asm-x86_64/fb.h
@@ -1,6 +1,6 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3 3#include <linux/fb.h>
4#include <linux/fs.h> 4#include <linux/fs.h>
5#include <asm/page.h> 5#include <asm/page.h>
6 6
@@ -11,4 +11,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
11 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; 11 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
12} 12}
13 13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
14#endif /* _ASM_FB_H_ */ 19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-xtensa/fb.h b/include/asm-xtensa/fb.h
index 9f8c88d05df4..c7df38030992 100644
--- a/include/asm-xtensa/fb.h
+++ b/include/asm-xtensa/fb.h
@@ -1,6 +1,12 @@
1#ifndef _ASM_FB_H_ 1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_ 2#define _ASM_FB_H_
3#include <linux/fb.h>
3 4
4#define fb_pgprotect(...) do {} while (0) 5#define fb_pgprotect(...) do {} while (0)
5 6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
6#endif /* _ASM_FB_H_ */ 12#endif /* _ASM_FB_H_ */