-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <asm/fb.h>. v2: * don't include <asm/prom.h> in header file Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230417125651.25126-18-tzimmermann@suse.de
- Loading branch information
Thomas Zimmermann
committed
Apr 20, 2023
1 parent
b6cf296
commit 4eec0b3
Showing
4 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
|
||
obj-$(CONFIG_FB) += fbdev.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
|
||
#include <linux/console.h> | ||
#include <linux/fb.h> | ||
#include <linux/module.h> | ||
|
||
#include <asm/fb.h> | ||
#include <asm/prom.h> | ||
|
||
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; | ||
} | ||
EXPORT_SYMBOL(fb_is_primary_device); |