[PATCH 3/5] make busID non mandatory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux