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 2
2
#ifndef _ASM_FB_H_
3
3
#define _ASM_FB_H_
4
4
5
- struct fb_info ;
5
+ #include <linux/types.h>
6
+
7
+ struct device ;
6
8
7
9
#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
10
12
#endif
11
13
12
14
#include <asm-generic/fb.h>
Original file line number Diff line number Diff line change 5
5
* Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
6
6
*/
7
7
8
- #include <linux/fb.h>
9
8
#include <linux/module.h>
10
9
11
10
#include <video/sticore.h>
12
11
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 )
14
15
{
15
16
struct sti_struct * sti ;
16
17
@@ -21,6 +22,6 @@ int fb_is_primary_device(struct fb_info *info)
21
22
return true;
22
23
23
24
/* return true if it's the default built-in framebuffer driver */
24
- return (sti -> dev == info -> device );
25
+ return (sti -> dev == dev );
25
26
}
26
- EXPORT_SYMBOL (fb_is_primary_device );
27
+ EXPORT_SYMBOL (video_is_primary_device );
Original file line number Diff line number Diff line change 3
3
#define _SPARC_FB_H_
4
4
5
5
#include <linux/io.h>
6
+ #include <linux/types.h>
6
7
7
8
#include <asm/page.h>
8
9
9
- struct fb_info ;
10
+ struct device ;
10
11
11
12
#ifdef CONFIG_SPARC32
12
13
static inline pgprot_t pgprot_framebuffer (pgprot_t prot ,
@@ -18,8 +19,8 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
18
19
#define pgprot_framebuffer pgprot_framebuffer
19
20
#endif
20
21
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
23
24
24
25
static inline void fb_memcpy_fromio (void * to , const volatile void __iomem * from , size_t n )
25
26
{
Original file line number Diff line number Diff line change 1
1
// SPDX-License-Identifier: GPL-2.0
2
2
3
3
#include <linux/console.h>
4
- #include <linux/fb .h>
4
+ #include <linux/device .h>
5
5
#include <linux/module.h>
6
6
7
+ #include <asm/fb.h>
7
8
#include <asm/prom.h>
8
9
9
- int fb_is_primary_device (struct fb_info * info )
10
+ bool video_is_primary_device (struct device * dev )
10
11
{
11
- struct device * dev = info -> device ;
12
- struct device_node * node ;
12
+ struct device_node * node = dev -> of_node ;
13
13
14
14
if (console_set_on_cmdline )
15
- return 0 ;
15
+ return false ;
16
16
17
- node = dev -> of_node ;
18
17
if (node && node == of_console_device )
19
- return 1 ;
18
+ return true ;
20
19
21
- return 0 ;
20
+ return false ;
22
21
}
23
- EXPORT_SYMBOL (fb_is_primary_device );
22
+ EXPORT_SYMBOL (video_is_primary_device );
24
23
25
24
MODULE_DESCRIPTION ("Sparc fbdev helpers" );
26
25
MODULE_LICENSE ("GPL" );
Original file line number Diff line number Diff line change 2
2
#ifndef _ASM_X86_FB_H
3
3
#define _ASM_X86_FB_H
4
4
5
+ #include <linux/types.h>
6
+
5
7
#include <asm/page.h>
6
8
7
- struct fb_info ;
9
+ struct device ;
8
10
9
11
pgprot_t pgprot_framebuffer (pgprot_t prot ,
10
12
unsigned long vm_start , unsigned long vm_end ,
11
13
unsigned long offset );
12
14
#define pgprot_framebuffer pgprot_framebuffer
13
15
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
16
18
17
19
#include <asm-generic/fb.h>
18
20
Original file line number Diff line number Diff line change 7
7
*
8
8
*/
9
9
10
- #include <linux/fb.h>
11
10
#include <linux/module.h>
12
11
#include <linux/pci.h>
13
12
#include <linux/vgaarb.h>
@@ -25,20 +24,17 @@ pgprot_t pgprot_framebuffer(pgprot_t prot,
25
24
}
26
25
EXPORT_SYMBOL (pgprot_framebuffer );
27
26
28
- int fb_is_primary_device (struct fb_info * info )
27
+ bool video_is_primary_device (struct device * dev )
29
28
{
30
- struct device * device = info -> device ;
31
- struct pci_dev * pci_dev ;
29
+ struct pci_dev * pdev ;
32
30
33
- if (!device || ! dev_is_pci (device ))
34
- return 0 ;
31
+ if (!dev_is_pci (dev ))
32
+ return false ;
35
33
36
- pci_dev = to_pci_dev (device );
34
+ pdev = to_pci_dev (dev );
37
35
38
- if (pci_dev == vga_default_device ())
39
- return 1 ;
40
- return 0 ;
36
+ return (pdev == vga_default_device ());
41
37
}
42
- EXPORT_SYMBOL (fb_is_primary_device );
38
+ EXPORT_SYMBOL (video_is_primary_device );
43
39
44
40
MODULE_LICENSE ("GPL" );
Original file line number Diff line number Diff line change @@ -2907,7 +2907,7 @@ void fbcon_remap_all(struct fb_info *info)
2907
2907
static void fbcon_select_primary (struct fb_info * info )
2908
2908
{
2909
2909
if (!map_override && primary_device == -1 &&
2910
- fb_is_primary_device (info )) {
2910
+ video_is_primary_device (info -> device )) {
2911
2911
int i ;
2912
2912
2913
2913
printk (KERN_INFO "fbcon: %s (fb%i) is primary device\n" ,
Original file line number Diff line number Diff line change 10
10
#include <linux/io.h>
11
11
#include <linux/mm_types.h>
12
12
#include <linux/pgtable.h>
13
+ #include <linux/types.h>
13
14
14
- struct fb_info ;
15
+ struct device ;
15
16
16
17
#ifndef pgprot_framebuffer
17
18
#define pgprot_framebuffer pgprot_framebuffer
@@ -23,11 +24,11 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,
23
24
}
24
25
#endif
25
26
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 )
29
30
{
30
- return 0 ;
31
+ return false ;
31
32
}
32
33
#endif
33
34
You can’t perform that action at this time.
0 commit comments