aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/hw/xfree86/os-support/linux/lnx_apm.c
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/linux/lnx_apm.c')
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_apm.c19
1 files changed, 6 insertions, 13 deletions
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;
}