diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-07-22 10:30:56 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-09-01 15:26:49 +1000 |
commit | d2a5f4166417b9d4a02a219b28470e41b6cfe012 (patch) | |
tree | a686f25792a81247ffa17dc6eee451a19bcd10dc /hw | |
parent | fbf35e27f3005cf009f2dd1e112260bb294342c7 (diff) |
xfree86: return the device from xf86ActivateDevice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index c0b216ac4..4513b99b0 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -307,7 +307,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local, * Returns TRUE on success, or FALSE otherwise. *********************************************************************** */ -static int +static DeviceIntPtr xf86ActivateDevice(LocalDevicePtr local) { DeviceIntPtr dev; @@ -319,7 +319,7 @@ xf86ActivateDevice(LocalDevicePtr local) xf86Msg(X_ERROR, "Too many input devices. Ignoring %s\n", local->name); local->dev = NULL; - return FALSE; + return NULL; } local->atom = MakeAtom(local->type_name, strlen(local->type_name), TRUE); @@ -337,7 +337,7 @@ xf86ActivateDevice(LocalDevicePtr local) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", local->name, local->type_name); - return TRUE; + return dev; } @@ -760,13 +760,12 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) goto unwind; } - if (!xf86ActivateDevice(pInfo)) + if (!(dev = xf86ActivateDevice(pInfo))) { rval = BadAlloc; goto unwind; } - dev = pInfo->dev; rval = ActivateDevice(dev, TRUE); if (rval != Success) { |