From a915739887477b28d924ecc8417ee107d125bd6c Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 6 Sep 2009 18:48:27 +0000 Subject: Switched to xorg-server-1.6.99.900.tar.gz --- xorg-server/hw/xfree86/os-support/linux/lnx_apm.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'xorg-server/hw/xfree86/os-support/linux/lnx_apm.c') diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c index 16ac80db8..4ccc7d662 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c @@ -160,15 +160,11 @@ lnxAPMOpen(void) { int fd, pfd; -#ifdef DEBUG - ErrorF("APM: OSPMOpen called\n"); -#endif + DebugF("APM: OSPMOpen called\n"); if (APMihPtr || !xf86Info.pmFlag) return NULL; -#ifdef DEBUG - ErrorF("APM: Opening device\n"); -#endif + DebugF("APM: Opening device\n"); if ((fd = open( APM_DEVICE, O_RDWR )) > -1) { if (access( APM_PROC, R_OK ) || ((pfd = open( APM_PROC, O_RDONLY)) == -1)) { @@ -180,11 +176,10 @@ lnxAPMOpen(void) close(pfd); xf86PMGetEventFromOs = lnxPMGetEventFromOs; xf86PMConfirmEventToOs = lnxPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd,xf86HandlePMEvents,NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); xf86MsgVerb(X_INFO,3,"Open APM successful\n"); return lnxCloseAPM; } - xf86MsgVerb(X_INFO,3,"No APM support in BIOS or kernel\n"); return NULL; } @@ -192,12 +187,10 @@ static void lnxCloseAPM(void) { int fd; - -#ifdef DEBUG - ErrorF("APM: Closing device\n"); -#endif + + DebugF("APM: Closing device\n"); if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } -- cgit v1.2.3