diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-08-22 12:05:18 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-08-22 12:05:18 +0000 |
commit | 7693f668efd206a6c259166665bc36d3c6335e8d (patch) | |
tree | b391edebc73a95fa69b79e9497e1bdb939c263ac /hw/xfree86/os-support/linux/lnx_apm.c | |
parent | 02c834f198eab4c4686d8156b88508fe102099c1 (diff) |
programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c
programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c
programs/Xserver/hw/xfree86/os-support/linux/Imakefile Add basic ACPI Linux
support so that events can be passed to the driver. (Alan Hourihane)
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_apm.c')
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_apm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c index ebc4534a8..1c2dc0cf4 100644 --- a/hw/xfree86/os-support/linux/lnx_apm.c +++ b/hw/xfree86/os-support/linux/lnx_apm.c @@ -29,6 +29,8 @@ # define APM_SUSPEND_FAILED 0xf001 #endif +static PMClose lnxAPMOpen(void); +extern PMClose lnxACPIOpen(void); static void lnxCloseAPM(void); static pointer APMihPtr = NULL; @@ -127,6 +129,21 @@ lnxPMConfirmEventToOs(int fd, pmEvent event) PMClose xf86OSPMOpen(void) { + PMClose ret = NULL; + + /* Favour ACPI over APM */ + + ret = lnxACPIOpen(); + + if (!ret) + ret = lnxAPMOpen(); + + return ret; +} + +static PMClose +lnxAPMOpen(void) +{ int fd, pfd; #ifdef DEBUG |