From 33a317f48eb3fe888177235ee49b635fbb8cda2f Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 4 Jan 2010 15:34:07 +0000 Subject: Git update 4/1/2010 --- xorg-server/hw/kdrive/linux/bus.c | 3 +-- xorg-server/hw/kdrive/linux/keyboard.c | 14 ++++++-------- xorg-server/hw/kdrive/linux/tslib.c | 14 ++++++-------- 3 files changed, 13 insertions(+), 18 deletions(-) (limited to 'xorg-server/hw/kdrive/linux') diff --git a/xorg-server/hw/kdrive/linux/bus.c b/xorg-server/hw/kdrive/linux/bus.c index 93c3ea5f3..de9b90f5a 100644 --- a/xorg-server/hw/kdrive/linux/bus.c +++ b/xorg-server/hw/kdrive/linux/bus.c @@ -75,8 +75,7 @@ BusInit (KdPointerInfo *pi) if ((fd = open (BusNames[i], 0)) >= 0) { close(fd); - if (pi->path) - xfree(pi->path); + xfree(pi->path); pi->path = strdup(BusNames[i]); return Success; } diff --git a/xorg-server/hw/kdrive/linux/keyboard.c b/xorg-server/hw/kdrive/linux/keyboard.c index 79cf59898..6eed7aed3 100644 --- a/xorg-server/hw/kdrive/linux/keyboard.c +++ b/xorg-server/hw/kdrive/linux/keyboard.c @@ -231,7 +231,7 @@ readKernelMapping(KdKeyboardInfo *ki) return; fd = LinuxConsoleFd; - + minKeyCode = NR_KEYS; maxKeyCode = 0; row = 0; @@ -241,7 +241,7 @@ readKernelMapping(KdKeyboardInfo *ki) kbe.kb_index = LNX_KEY_INDEX(i); k = ki->keySyms.map + row * ki->keySyms.mapWidth; - + for (j = 0; j < ki->keySyms.mapWidth; ++j) { unsigned short kval; @@ -463,7 +463,7 @@ readKernelMapping(KdKeyboardInfo *ki) k[j] = (kbe.kb_value & 0xFF) + 0x1008FF00; break; #endif - + default: break; } @@ -720,7 +720,7 @@ static void LinuxKeyboardDisable (KdKeyboardInfo *ki) { int fd; - + if (!ki) return; @@ -737,11 +737,9 @@ LinuxKeyboardInit (KdKeyboardInfo *ki) if (!ki) return !Success; - if (ki->path) - xfree(ki->path); + xfree(ki->path); ki->path = strdup("console"); - if (ki->name) - xfree(ki->name); + xfree(ki->name); ki->name = strdup("Linux console keyboard"); readKernelMapping (ki); diff --git a/xorg-server/hw/kdrive/linux/tslib.c b/xorg-server/hw/kdrive/linux/tslib.c index 7cc23e637..322ccc7d5 100644 --- a/xorg-server/hw/kdrive/linux/tslib.c +++ b/xorg-server/hw/kdrive/linux/tslib.c @@ -9,7 +9,7 @@ * Copyright © 2002 MontaVista Software Inc. * Copyright © 2005 OpenedHand Ltd. * Copyright © 2006 Nokia Corporation - * + * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that @@ -76,7 +76,7 @@ TsRead (int fd, void *closure) if (event.pressure) { flags = KD_BUTTON_1; - /* + /* * Here we test for the touch screen driver actually being on the * touch screen, if it is we send absolute coordinates. If not, * then we send delta's so that we can track the entire vga screen. @@ -127,7 +127,7 @@ TslibEnable (KdPointerInfo *pi) } KdRegisterFd(private->fd, TsRead, pi); - + return Success; } @@ -155,7 +155,7 @@ TslibInit (KdPointerInfo *pi) if (!pi || !pi->dixdev) return !Success; - + pi->driverPrivate = (struct TslibPrivate *) xcalloc(sizeof(struct TslibPrivate), 1); if (!pi->driverPrivate) @@ -175,10 +175,8 @@ TslibInit (KdPointerInfo *pi) static void TslibFini (KdPointerInfo *pi) { - if (pi->driverPrivate) { - xfree(pi->driverPrivate); - pi->driverPrivate = NULL; - } + xfree(pi->driverPrivate); + pi->driverPrivate = NULL; } -- cgit v1.2.3