[PATCH 3/5] make busID non mandatory
Sascha Hauer
s.hauer at pengutronix.de
Sat Mar 3 05:09:25 PST 2012
Currently the driver only probes a device when it has a
busID. The busID is optional so don't depend on it.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
src/driver.c | 46 ++++++++++++++++++++++------------------------
1 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/src/driver.c b/src/driver.c
index dc90e04..a9422a5 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -273,32 +273,30 @@ Probe(DriverPtr drv, int flags)
for (i = 0; i < numDevSections; i++) {
dev = xf86FindOptionValue(devSections[i]->options,"kmsdev");
- if (devSections[i]->busID) {
- if (probe_hw(dev)) {
- int entity;
- entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
- scrn = xf86ConfigFbEntity(scrn, 0, entity,
- NULL, NULL, NULL, NULL);
- }
+ if (probe_hw(dev)) {
+ int entity;
+ entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
+ scrn = xf86ConfigFbEntity(scrn, 0, entity,
+ NULL, NULL, NULL, NULL);
+ }
- if (scrn) {
- foundScreen = TRUE;
- scrn->driverVersion = 1;
- scrn->driverName = "modesetting";
- scrn->name = "modesetting";
- scrn->Probe = Probe;
- scrn->PreInit = PreInit;
- scrn->ScreenInit = ScreenInit;
- scrn->SwitchMode = SwitchMode;
- scrn->AdjustFrame = AdjustFrame;
- scrn->EnterVT = EnterVT;
- scrn->LeaveVT = LeaveVT;
- scrn->FreeScreen = FreeScreen;
- scrn->ValidMode = ValidMode;
-
- xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ if (scrn) {
+ foundScreen = TRUE;
+ scrn->driverVersion = 1;
+ scrn->driverName = "modesetting";
+ scrn->name = "modesetting";
+ scrn->Probe = Probe;
+ scrn->PreInit = PreInit;
+ scrn->ScreenInit = ScreenInit;
+ scrn->SwitchMode = SwitchMode;
+ scrn->AdjustFrame = AdjustFrame;
+ scrn->EnterVT = EnterVT;
+ scrn->LeaveVT = LeaveVT;
+ scrn->FreeScreen = FreeScreen;
+ scrn->ValidMode = ValidMode;
+
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
"using %s\n", dev ? dev : "default device");
- }
}
}
--
1.7.9.1
More information about the dri-devel
mailing list