diff options
Diffstat (limited to 'include/asm-sparc64/fb.h')
-rw-r--r-- | include/asm-sparc64/fb.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h index d6cd3a175fc3..389012e5fbad 100644 --- a/include/asm-sparc64/fb.h +++ b/include/asm-sparc64/fb.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/fb.h> | 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 | #include <asm/prom.h> | ||
6 | 7 | ||
7 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | 8 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
8 | unsigned long off) | 9 | unsigned long off) |
@@ -12,6 +13,14 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |||
12 | 13 | ||
13 | static inline int fb_is_primary_device(struct fb_info *info) | 14 | static inline int fb_is_primary_device(struct fb_info *info) |
14 | { | 15 | { |
16 | struct device *dev = info->device; | ||
17 | struct device_node *node; | ||
18 | |||
19 | node = dev->archdata.prom_node; | ||
20 | if (node && | ||
21 | node == of_console_device) | ||
22 | return 1; | ||
23 | |||
15 | return 0; | 24 | return 0; |
16 | } | 25 | } |
17 | 26 | ||