From 3adf55ad5c0fcabf1c53bb274f39953cb1d6698f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 18 Jul 2007 22:03:58 -0700 Subject: [SPARC]: Implement fb_is_primary_device(). Signed-off-by: David S. Miller --- include/asm-sparc64/fb.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/asm-sparc64') diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h index d6cd3a175fc..389012e5fba 100644 --- a/include/asm-sparc64/fb.h +++ b/include/asm-sparc64/fb.h @@ -3,6 +3,7 @@ #include #include #include +#include static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) @@ -12,6 +13,14 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, static inline int fb_is_primary_device(struct fb_info *info) { + struct device *dev = info->device; + struct device_node *node; + + node = dev->archdata.prom_node; + if (node && + node == of_console_device) + return 1; + return 0; } -- cgit v1.2.3-18-g5258