diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-10-08 17:45:40 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-10-31 18:23:03 -0700 |
commit | 55246b67b755d4c1039d54971fe3f77ea60d604e (patch) | |
tree | 22973361b7b1488b260ccd529781806571e4a754 /hw | |
parent | 95bf478b78e466002c382bcde7d4d62591e9215d (diff) |
xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideo
After fc3ab84d the pVideo field in DevToConfig[i] is no longer
initialized, so it's always NULL. This causes the duplicate finding
algorithm in the beginning of the function to not work anymore as it
is based on this field.
The symptom of this bug is that X -configure reports
Number of created screens does not match number of detected devices.
Configuration failed.
Server terminated with error (2). Closing log file.
rather than producing a working config file.
This patch fixes that bug by initializing the field before calling
xf86PciConfigureNewDev().
Cc: tvignatti@gmail.com
Signed-off-by: Soren Sandmann <ssp@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Configure.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 6c5e35919..91e8df93d 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -123,12 +123,14 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, switch (bus) { #ifdef XSERVER_LIBPCIACCESS case BUS_PCI: + DevToConfig[i].pVideo = busData; xf86PciConfigureNewDev(busData, DevToConfig[i].pVideo, &DevToConfig[i].GDev, &chipset); break; #endif #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: + DevToConfig[i].sVideo = busData; xf86SbusConfigureNewDev(busData, DevToConfig[i].sVideo, &DevToConfig[i].GDev); break; |