1 | // SPDX-License-Identifier: GPL-2.0 |
---|---|
2 | |
3 | #include <linux/console.h> |
4 | #include <linux/fb.h> |
5 | #include <linux/module.h> |
6 | |
7 | #include <asm/prom.h> |
8 | |
9 | int fb_is_primary_device(struct fb_info *info) |
10 | { |
11 | struct device *dev = info->device; |
12 | struct device_node *node; |
13 | |
14 | if (console_set_on_cmdline) |
15 | return 0; |
16 | |
17 | node = dev->of_node; |
18 | if (node && node == of_console_device) |
19 | return 1; |
20 | |
21 | return 0; |
22 | } |
23 | EXPORT_SYMBOL(fb_is_primary_device); |
24 | |
25 | MODULE_DESCRIPTION("Sparc fbdev helpers"); |
26 | MODULE_LICENSE("GPL"); |
27 |