patch-2.4.0-test12 linux/include/linux/apm_bios.h
Next file: linux/include/linux/atmdev.h
Previous file: linux/include/linux/agpgart.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Wed Dec 6 21:00:13 2000
- Orig file:
v2.4.0-test11/linux/include/linux/apm_bios.h
- Orig date:
Sun Feb 20 20:37:09 2000
diff -u --recursive --new-file v2.4.0-test11/linux/include/linux/apm_bios.h linux/include/linux/apm_bios.h
@@ -38,7 +38,7 @@
unsigned short dseg_len;
};
- /* Results of APM Installation Check */
+/* Results of APM Installation Check */
#define APM_16_BIT_SUPPORT 0x0001
#define APM_32_BIT_SUPPORT 0x0002
#define APM_IDLE_SLOWS_CLOCK 0x0004
@@ -46,6 +46,15 @@
#define APM_BIOS_DISENGAGED 0x0010
/*
+ * Data for APM that is persistant across module unload/load
+ */
+struct apm_info {
+ struct apm_bios_info bios;
+ unsigned short connection_version;
+ int get_power_status_broken;
+};
+
+/*
* The APM function codes
*/
#define APM_FUNC_INST_CHECK 0x5300
@@ -91,12 +100,9 @@
#define APM_FUNC_TIMER_GET 2
/*
- * in init/main.c
+ * in arch/i386/kernel/setup.c
*/
-extern struct apm_bios_info apm_bios_info;
-
-extern int apm_register_callback(int (*callback)(apm_event_t));
-extern void apm_unregister_callback(int (*callback)(apm_event_t));
+extern struct apm_info apm_info;
#endif /* __KERNEL__ */
@@ -176,7 +182,7 @@
/*
* This is the "All Devices" ID communicated to the BIOS
*/
-#define APM_DEVICE_BALL ((apm_bios_info.version > 0x0100) ? \
+#define APM_DEVICE_BALL ((apm_info.connection_version > 0x0100) ? \
APM_DEVICE_ALL : APM_DEVICE_OLD_ALL)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)