[PATCH 01/14] xfree86: use udev to provide device enumeration for kms devices (v9)
Michal Srb
msrb at suse.com
Mon Jun 25 08:56:44 PDT 2012
On Thursday 14 of June 2012 15:43:35 Dave Airlie wrote:
> +int
> +xf86platformProbeDev(DriverPtr drvp)
> +{
> + Bool foundScreen = FALSE;
> + GDevPtr *devList;
> + const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList);
> + int i, j;
> +
> + /* find the main device or any device specificed in xorg.conf */
> + for (i = 0; i < numDevs; i++) {
> + for (j = 0; j < xf86_num_platform_devices; j++) {
> + if (devList[i]->busID && *devList[i]->busID) {
> + if (xf86PlatformDeviceCheckBusID(&xf86_platform_devices[j], devList[i]->busID))
> + break;
> + }
> + else {
> + if (xf86_platform_devices[j].pdev) {
> + if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
> + break;
> + }
> + }
> + }
> +
> + if (j == xf86_num_platform_devices)
> + continue;
> +
> + foundScreen = probeSingleDevice(&xf86_platform_devices[j], drvp, devList[i], 0);
> + if (!foundScreen)
> + continue;
Not sure if it is still relevant, but what purpose has this continue?
Preparation for more code to be added bellow or was it supposed to be break?
> + }
> +
> + return foundScreen;
> +}
Michal Srb
More information about the xorg-devel
mailing list