From 4eec0b3048fcd74b504c2a6828a07f133a8ab508 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Mon, 17 Apr 2023 14:56:49 +0200 Subject: arch/sparc: Implement fb_is_primary_device() in source file Other architectures implment fb_is_primary_device() in a source file. Do the same on sparc. No functional changes, but allows to remove several include statement from . v2: * don't include in header file Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" Acked-by: Arnd Bergmann Acked-by: Helge Deller Link: https://patchwork.freedesktop.org/patch/msgid/20230417125651.25126-18-tzimmermann@suse.de --- arch/sparc/include/asm/fb.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h index f699962e9ddf..28609f7a965c 100644 --- a/arch/sparc/include/asm/fb.h +++ b/arch/sparc/include/asm/fb.h @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _SPARC_FB_H_ #define _SPARC_FB_H_ -#include -#include + #include + #include -#include + +struct fb_info; static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) @@ -15,20 +16,6 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, #endif } -static inline int fb_is_primary_device(struct fb_info *info) -{ - struct device *dev = info->device; - struct device_node *node; - - if (console_set_on_cmdline) - return 0; - - node = dev->of_node; - if (node && - node == of_console_device) - return 1; - - return 0; -} +int fb_is_primary_device(struct fb_info *info); #endif /* _SPARC_FB_H_ */ -- cgit v1.2.3