Merge tag 'drm-misc-next-2022-08-20-1' of git://anongit.freedesktop.org/drm/drm-misc...
[linux-block.git] / drivers / video / fbdev / tdfxfb.c
index f056d80f6359f2dfd82c57fb9e753367bdfa1e45..059e0174e139757260fbe3b807545ea2bd724aff 100644 (file)
@@ -64,6 +64,7 @@
  *
  */
 
+#include <linux/aperture.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -206,9 +207,7 @@ static inline u8 crt_inb(struct tdfx_par *par, u32 idx)
 
 static inline void att_outb(struct tdfx_par *par, u32 idx, u8 val)
 {
-       unsigned char tmp;
-
-       tmp = vga_inb(par, IS1_R);
+       vga_inb(par, IS1_R);
        vga_outb(par, ATT_IW, idx);
        vga_outb(par, ATT_IW, val);
 }
@@ -1378,6 +1377,10 @@ static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        struct fb_monspecs *specs;
        bool found;
 
+       err = aperture_remove_conflicting_pci_devices(pdev, "tdfxfb");
+       if (err)
+               return err;
+
        err = pci_enable_device(pdev);
        if (err) {
                printk(KERN_ERR "tdfxfb: Can't enable pdev: %d\n", err);