fbdev/efifb: Do not track parent device status
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 12 Feb 2024 09:06:14 +0000 (10:06 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 14 Feb 2024 09:09:18 +0000 (10:09 +0100)
There will be no EFI framebuffer device for disabled parent devices
and thus we never probe efifb in that case. Hence remove the tracking
code from efifb.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-7-tzimmermann@suse.de
drivers/video/fbdev/efifb.c

index e66ef35fa6b626387347f3cf6be2a186be379dfc..f76b7ae007518415f3dd13f5ceea8eebf335525d 100644 (file)
@@ -348,8 +348,6 @@ static struct attribute *efifb_attrs[] = {
 };
 ATTRIBUTE_GROUPS(efifb);
 
-static bool pci_dev_disabled;  /* FB base matches BAR of a disabled device */
-
 static struct resource *bar_resource;
 static u64 bar_offset;
 
@@ -377,7 +375,7 @@ static int efifb_probe(struct platform_device *dev)
        if (!si)
                return -ENOMEM;
 
-       if (si->orig_video_isVGA != VIDEO_TYPE_EFI || pci_dev_disabled)
+       if (si->orig_video_isVGA != VIDEO_TYPE_EFI)
                return -ENODEV;
 
        if (fb_get_options("efifb", &option))
@@ -653,7 +651,6 @@ static void record_efifb_bar_resource(struct pci_dev *dev, int idx, u64 offset)
 
        pci_read_config_word(dev, PCI_COMMAND, &word);
        if (!(word & PCI_COMMAND_MEMORY)) {
-               pci_dev_disabled = true;
                dev_err(&dev->dev,
                        "BAR %d: assigned to efifb but device is disabled!\n",
                        idx);