From 12b8de566fa9ec428e724f955735fd1ca278ca4c Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 20 Dec 2023 14:22:54 +0100 Subject: video/sticore: Store ROM device in STI struct Store the ROM's parent device in each STI struct, so we can associate the STI framebuffer with a device. The new field will eventually replace the fbdev subsystem's info field, which the function fb_is_primary_device() currently requires to detect the firmware's output. By using the device instead of the framebuffer info, a later patch can generalize the helper for use in non-fbdev code. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller --- drivers/video/sticore.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/video') diff --git a/drivers/video/sticore.c b/drivers/video/sticore.c index c3765ad6eedf..7115b325817f 100644 --- a/drivers/video/sticore.c +++ b/drivers/video/sticore.c @@ -1041,6 +1041,9 @@ static int __init sticore_pa_init(struct parisc_device *dev) print_pa_hwpath(dev, sti->pa_path); sticore_check_for_default_sti(sti, sti->pa_path); + + sti->dev = &dev->dev; + return 0; } @@ -1084,6 +1087,8 @@ static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent) pr_warn("Unable to handle STI device '%s'\n", pci_name(pd)); return -ENODEV; } + + sti->dev = &pd->dev; #endif /* CONFIG_PCI */ return 0; -- cgit v1.2.3