[PATCH] xfree86: merge driver from the input class into the options.
Dan Nicholson
dbn.lists at gmail.com
Mon Mar 22 23:41:02 PDT 2010
On Mon, Mar 22, 2010 at 7:19 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> A driver that is assigned by an input class is only present as idev->driver.
> The driver itself has no access to this information once PreInit is called.
> For devices that rely on chain-hotplugging (wacom), this means that for the
> second device the driver information is lost and the second device cannot be
> initialized through NewInputDeviceRequest. Although this could be worked
> around by hardcoding the driver name in the wacom driver, having the
> assigned driver in the options seems like the better solution.
>
> This issue only manifests itself with the udev backend. With HAL, the driver
> is assigned by HAL and the option is duplicated in config/hal.c.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> hw/xfree86/common/xf86Xinput.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index e9f7f2f..8229227 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -618,6 +618,7 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs)
> "InputClass configuration");
> return BadAlloc;
> }
> + mergedopts = xf86ReplaceStrOption(mergedopts, "driver", idev->driver);
> }
> idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts);
>
Well, wacom could just add it to the options argument when calling
NewInputDeviceRequest, but it can't hurt anything.
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
More information about the xorg-devel
mailing list