diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-03-29 21:32:11 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2024-05-03 17:07:50 +0200 |
commit | f178e96de7f0868e1b4d6df687794961f30125f2 (patch) | |
tree | 290381ec60109f2e5165a308e58d960c18e93c61 /arch/sparc | |
parent | f25eae2c405cbe810f8c52d743ea2b507c3fc301 (diff) |
arch: Remove struct fb_info from video helpers
The per-architecture video helpers do not depend on struct fb_info
or anything else from fbdev. Remove it from the interface and replace
fb_is_primary_device() with video_is_primary_device(). The new helper
is similar in functionality, but can operate on non-fbdev devices.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/fb.h | 7 | ||||
-rw-r--r-- | arch/sparc/video/fbdev.c | 17 |
2 files changed, 12 insertions, 12 deletions
diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h index 24440c0fda49..07f0325d6921 100644 --- a/arch/sparc/include/asm/fb.h +++ b/arch/sparc/include/asm/fb.h @@ -3,10 +3,11 @@ #define _SPARC_FB_H_ #include <linux/io.h> +#include <linux/types.h> #include <asm/page.h> -struct fb_info; +struct device; #ifdef CONFIG_SPARC32 static inline pgprot_t pgprot_framebuffer(pgprot_t prot, @@ -18,8 +19,8 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot, #define pgprot_framebuffer pgprot_framebuffer #endif -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 static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) { diff --git a/arch/sparc/video/fbdev.c b/arch/sparc/video/fbdev.c index bff66dd1909a..e46f0499c277 100644 --- a/arch/sparc/video/fbdev.c +++ b/arch/sparc/video/fbdev.c @@ -1,26 +1,25 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/console.h> -#include <linux/fb.h> +#include <linux/device.h> #include <linux/module.h> +#include <asm/fb.h> #include <asm/prom.h> -int fb_is_primary_device(struct fb_info *info) +bool video_is_primary_device(struct device *dev) { - struct device *dev = info->device; - struct device_node *node; + struct device_node *node = dev->of_node; if (console_set_on_cmdline) - return 0; + return false; - node = dev->of_node; if (node && node == of_console_device) - return 1; + return true; - return 0; + return false; } -EXPORT_SYMBOL(fb_is_primary_device); +EXPORT_SYMBOL(video_is_primary_device); MODULE_DESCRIPTION("Sparc fbdev helpers"); MODULE_LICENSE("GPL"); |