diff options
author | Adam Jackson <ajax@redhat.com> | 2010-12-08 13:45:32 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2010-12-08 14:12:11 -0500 |
commit | b1f7f190f9d4f2ab63d3e9ade3e7e04bb4b1f89f (patch) | |
tree | e77a646b57199c39204f307c2d1a25b16c1077e3 | |
parent | fba7f460838624f55ade074e1c7690f4aa7aed4d (diff) |
Refuse to load if there's a kernel driver bound to the device
Ported from the equivalent check in nv.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | src/vesa.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -431,8 +431,14 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev, pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, NULL, NULL, NULL, NULL, NULL); if (pScrn != NULL) { - VESAPtr pVesa = VESAGetRec(pScrn); + VESAPtr pVesa; + if (pci_device_has_kernel_driver(dev)) { + ErrorF("vesa: Ignoring device with a bound kernel driver\n"); + return FALSE; + } + + pVesa = VESAGetRec(pScrn); VESAInitScrn(pScrn); pVesa->pciInfo = dev; } |