b7eff6
From 4528e6dfb838a0f2d164ae15e637406adba36144 Mon Sep 17 00:00:00 2001
b7eff6
From: Peter Hutterer <peter.hutterer@who-t.net>
b7eff6
Date: Tue, 23 Mar 2010 12:13:56 +1000
b7eff6
Subject: [PATCH] xfree86: merge driver from the input class into the options.
b7eff6
b7eff6
A driver that is assigned by an input class is only present as idev->driver.
b7eff6
The driver itself has no access to this information once PreInit is called.
b7eff6
For devices that rely on chain-hotplugging (wacom), this means that for the
b7eff6
second device the driver information is lost and the second device cannot be
b7eff6
initialized through NewInputDeviceRequest. Although this could be worked
b7eff6
around by hardcoding the driver name in the wacom driver, having the
b7eff6
assigned driver in the options seems like the better solution.
b7eff6
b7eff6
This issue only manifests itself with the udev backend. With HAL, the driver
b7eff6
is assigned by HAL and the option is duplicated in config/hal.c.
b7eff6
b7eff6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
b7eff6
---
b7eff6
 hw/xfree86/common/xf86Xinput.c |    1 +
b7eff6
 1 files changed, 1 insertions(+), 0 deletions(-)
b7eff6
b7eff6
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
b7eff6
index e9f7f2f..8229227 100644
b7eff6
--- a/hw/xfree86/common/xf86Xinput.c
b7eff6
+++ b/hw/xfree86/common/xf86Xinput.c
b7eff6
@@ -618,6 +618,7 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs)
b7eff6
                     "InputClass configuration");
b7eff6
             return BadAlloc;
b7eff6
         }
b7eff6
+        mergedopts = xf86ReplaceStrOption(mergedopts, "driver", idev->driver);
b7eff6
     }
b7eff6
     idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts);
b7eff6
 
b7eff6
-- 
b7eff6
1.6.6.1
b7eff6