diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/fb.h | 8 | ||||
-rw-r--r-- | arch/x86/video/fbdev.c | 18 |
2 files changed, 12 insertions, 14 deletions
diff --git a/arch/x86/include/asm/fb.h b/arch/x86/include/asm/fb.h index c3b9582de7ef..999db3379286 100644 --- a/arch/x86/include/asm/fb.h +++ b/arch/x86/include/asm/fb.h @@ -2,17 +2,19 @@ #ifndef _ASM_X86_FB_H #define _ASM_X86_FB_H +#include <linux/types.h> + #include <asm/page.h> -struct fb_info; +struct device; pgprot_t pgprot_framebuffer(pgprot_t prot, unsigned long vm_start, unsigned long vm_end, unsigned long offset); #define pgprot_framebuffer pgprot_framebuffer -int fb_is_primary_device(struct fb_info *info); -#define fb_is_primary_device fb_is_primary_device +bool video_is_primary_device(struct device *dev); +#define video_is_primary_device video_is_primary_device #include <asm-generic/fb.h> diff --git a/arch/x86/video/fbdev.c b/arch/x86/video/fbdev.c index 1dd6528cc947..4d87ce8e257f 100644 --- a/arch/x86/video/fbdev.c +++ b/arch/x86/video/fbdev.c @@ -7,7 +7,6 @@ * */ -#include <linux/fb.h> #include <linux/module.h> #include <linux/pci.h> #include <linux/vgaarb.h> @@ -25,20 +24,17 @@ pgprot_t pgprot_framebuffer(pgprot_t prot, } EXPORT_SYMBOL(pgprot_framebuffer); -int fb_is_primary_device(struct fb_info *info) +bool video_is_primary_device(struct device *dev) { - struct device *device = info->device; - struct pci_dev *pci_dev; + struct pci_dev *pdev; - if (!device || !dev_is_pci(device)) - return 0; + if (!dev_is_pci(dev)) + return false; - pci_dev = to_pci_dev(device); + pdev = to_pci_dev(dev); - if (pci_dev == vga_default_device()) - return 1; - return 0; + return (pdev == vga_default_device()); } -EXPORT_SYMBOL(fb_is_primary_device); +EXPORT_SYMBOL(video_is_primary_device); MODULE_LICENSE("GPL"); |