]> Pileus Git - ~andy/linux/blobdiff - drivers/pci/pci-sysfs.c
Merge tag 'parisc-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
[~andy/linux] / drivers / pci / pci-sysfs.c
index a55e248618cd00e7de495a078c3bb59d177123f4..86c63fe45d11bf22225afffd1317777edefcc8c7 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/security.h>
 #include <linux/pci-aspm.h>
 #include <linux/slab.h>
+#include <linux/vgaarb.h>
 #include "pci.h"
 
 static int sysfs_initialized;  /* = 0 */
@@ -417,6 +418,10 @@ static ssize_t
 boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
+       struct pci_dev *vga_dev = vga_default_device();
+
+       if (vga_dev)
+               return sprintf(buf, "%u\n", (pdev == vga_dev));
 
        return sprintf(buf, "%u\n",
                !!(pdev->resource[PCI_ROM_RESOURCE].flags &