]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/sparc/include/asm/fb.h
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6
[net-next-2.6.git] / arch / sparc / include / asm / fb.h
CommitLineData
9f747d6c
DM
1#ifndef _SPARC_FB_H_
2#define _SPARC_FB_H_
0a492896 3#include <linux/console.h>
317b3c21 4#include <linux/fb.h>
9f747d6c
DM
5#include <linux/fs.h>
6#include <asm/page.h>
3adf55ad 7#include <asm/prom.h>
10eb2659 8
9f747d6c
DM
9static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
10 unsigned long off)
11{
12#ifdef CONFIG_SPARC64
13 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
14#endif
15}
10eb2659 16
317b3c21
AD
17static inline int fb_is_primary_device(struct fb_info *info)
18{
3adf55ad
DM
19 struct device *dev = info->device;
20 struct device_node *node;
21
0a492896
DM
22 if (console_set_on_cmdline)
23 return 0;
24
61c7a080 25 node = dev->of_node;
3adf55ad
DM
26 if (node &&
27 node == of_console_device)
28 return 1;
29
317b3c21
AD
30 return 0;
31}
32
9f747d6c 33#endif /* _SPARC_FB_H_ */