File tree Expand file tree Collapse file tree 8 files changed +41
-39
lines changed
Expand file tree Collapse file tree 8 files changed +41
-39
lines changed Original file line number Diff line number Diff line change 22#ifndef _ASM_FB_H_
33#define _ASM_FB_H_
44
5- struct fb_info ;
5+ #include <linux/types.h>
6+
7+ struct device ;
68
79#if defined(CONFIG_STI_CORE )
8- int fb_is_primary_device (struct fb_info * info );
9- #define fb_is_primary_device fb_is_primary_device
10+ bool video_is_primary_device (struct device * dev );
11+ #define video_is_primary_device video_is_primary_device
1012#endif
1113
1214#include <asm-generic/fb.h>
Original file line number Diff line number Diff line change 55 * Copyright (C) 2001-2002 Thomas Bogendoerfer <[email protected] > 66 */
77
8- #include <linux/fb.h>
98#include <linux/module.h>
109
1110#include <video/sticore.h>
1211
13- int fb_is_primary_device (struct fb_info * info )
12+ #include <asm/fb.h>
13+
14+ bool video_is_primary_device (struct device * dev )
1415{
1516 struct sti_struct * sti ;
1617
@@ -21,6 +22,6 @@ int fb_is_primary_device(struct fb_info *info)
2122 return true;
2223
2324 /* return true if it's the default built-in framebuffer driver */
24- return (sti -> dev == info -> device );
25+ return (sti -> dev == dev );
2526}
26- EXPORT_SYMBOL (fb_is_primary_device );
27+ EXPORT_SYMBOL (video_is_primary_device );
Original file line number Diff line number Diff line change 33#define _SPARC_FB_H_
44
55#include <linux/io.h>
6+ #include <linux/types.h>
67
78#include <asm/page.h>
89
9- struct fb_info ;
10+ struct device ;
1011
1112#ifdef CONFIG_SPARC32
1213static inline pgprot_t pgprot_framebuffer (pgprot_t prot ,
@@ -18,8 +19,8 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
1819#define pgprot_framebuffer pgprot_framebuffer
1920#endif
2021
21- int fb_is_primary_device (struct fb_info * info );
22- #define fb_is_primary_device fb_is_primary_device
22+ bool video_is_primary_device (struct device * dev );
23+ #define video_is_primary_device video_is_primary_device
2324
2425static inline void fb_memcpy_fromio (void * to , const volatile void __iomem * from , size_t n )
2526{
Original file line number Diff line number Diff line change 11// SPDX-License-Identifier: GPL-2.0
22
33#include <linux/console.h>
4- #include <linux/fb .h>
4+ #include <linux/device .h>
55#include <linux/module.h>
66
7+ #include <asm/fb.h>
78#include <asm/prom.h>
89
9- int fb_is_primary_device (struct fb_info * info )
10+ bool video_is_primary_device (struct device * dev )
1011{
11- struct device * dev = info -> device ;
12- struct device_node * node ;
12+ struct device_node * node = dev -> of_node ;
1313
1414 if (console_set_on_cmdline )
15- return 0 ;
15+ return false ;
1616
17- node = dev -> of_node ;
1817 if (node && node == of_console_device )
19- return 1 ;
18+ return true ;
2019
21- return 0 ;
20+ return false ;
2221}
23- EXPORT_SYMBOL (fb_is_primary_device );
22+ EXPORT_SYMBOL (video_is_primary_device );
2423
2524MODULE_DESCRIPTION ("Sparc fbdev helpers" );
2625MODULE_LICENSE ("GPL" );
Original file line number Diff line number Diff line change 22#ifndef _ASM_X86_FB_H
33#define _ASM_X86_FB_H
44
5+ #include <linux/types.h>
6+
57#include <asm/page.h>
68
7- struct fb_info ;
9+ struct device ;
810
911pgprot_t pgprot_framebuffer (pgprot_t prot ,
1012 unsigned long vm_start , unsigned long vm_end ,
1113 unsigned long offset );
1214#define pgprot_framebuffer pgprot_framebuffer
1315
14- int fb_is_primary_device (struct fb_info * info );
15- #define fb_is_primary_device fb_is_primary_device
16+ bool video_is_primary_device (struct device * dev );
17+ #define video_is_primary_device video_is_primary_device
1618
1719#include <asm-generic/fb.h>
1820
Original file line number Diff line number Diff line change 77 *
88 */
99
10- #include <linux/fb.h>
1110#include <linux/module.h>
1211#include <linux/pci.h>
1312#include <linux/vgaarb.h>
@@ -25,20 +24,17 @@ pgprot_t pgprot_framebuffer(pgprot_t prot,
2524}
2625EXPORT_SYMBOL (pgprot_framebuffer );
2726
28- int fb_is_primary_device (struct fb_info * info )
27+ bool video_is_primary_device (struct device * dev )
2928{
30- struct device * device = info -> device ;
31- struct pci_dev * pci_dev ;
29+ struct pci_dev * pdev ;
3230
33- if (!device || ! dev_is_pci (device ))
34- return 0 ;
31+ if (!dev_is_pci (dev ))
32+ return false ;
3533
36- pci_dev = to_pci_dev (device );
34+ pdev = to_pci_dev (dev );
3735
38- if (pci_dev == vga_default_device ())
39- return 1 ;
40- return 0 ;
36+ return (pdev == vga_default_device ());
4137}
42- EXPORT_SYMBOL (fb_is_primary_device );
38+ EXPORT_SYMBOL (video_is_primary_device );
4339
4440MODULE_LICENSE ("GPL" );
Original file line number Diff line number Diff line change @@ -2907,7 +2907,7 @@ void fbcon_remap_all(struct fb_info *info)
29072907static void fbcon_select_primary (struct fb_info * info )
29082908{
29092909 if (!map_override && primary_device == -1 &&
2910- fb_is_primary_device (info )) {
2910+ video_is_primary_device (info -> device )) {
29112911 int i ;
29122912
29132913 printk (KERN_INFO "fbcon: %s (fb%i) is primary device\n" ,
Original file line number Diff line number Diff line change 1010#include <linux/io.h>
1111#include <linux/mm_types.h>
1212#include <linux/pgtable.h>
13+ #include <linux/types.h>
1314
14- struct fb_info ;
15+ struct device ;
1516
1617#ifndef pgprot_framebuffer
1718#define pgprot_framebuffer pgprot_framebuffer
@@ -23,11 +24,11 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
2324}
2425#endif
2526
26- #ifndef fb_is_primary_device
27- #define fb_is_primary_device fb_is_primary_device
28- static inline int fb_is_primary_device (struct fb_info * info )
27+ #ifndef video_is_primary_device
28+ #define video_is_primary_device video_is_primary_device
29+ static inline bool video_is_primary_device (struct device * dev )
2930{
30- return 0 ;
31+ return false ;
3132}
3233#endif
3334
You can’t perform that action at this time.
0 commit comments