fb.h 583 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _SPARC_FB_H_
  2. #define _SPARC_FB_H_
  3. #include <linux/fb.h>
  4. #include <linux/fs.h>
  5. #include <asm/page.h>
  6. #include <asm/prom.h>
  7. static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
  8. unsigned long off)
  9. {
  10. #ifdef CONFIG_SPARC64
  11. vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
  12. #endif
  13. }
  14. static inline int fb_is_primary_device(struct fb_info *info)
  15. {
  16. struct device *dev = info->device;
  17. struct device_node *node;
  18. node = dev->archdata.prom_node;
  19. if (node &&
  20. node == of_console_device)
  21. return 1;
  22. return 0;
  23. }
  24. #endif /* _SPARC_FB_H_ */