Hi Linus,

This fixes compilation of 2.3.26 when APM is included but
CONFIG_MAGIC_SYSRQ is not.  It also removes a bit of no
longer needed doco.

To the world at large:

APM bugs/problems/feature requests can now be sent to
[EMAIL PROTECTED] or submitted through the APM web
pages at http://linuxcare.com.au/apm/

Future patches will be on that web page.  This patch is
there as http://linuxcare.com.au/apm/2.3.26-APM.1.gz

Cheers,
Stephen
--
Stephen Rothwell                    [EMAIL PROTECTED]
http://linuxcare.com.au/sfr/

diff -ruN 2.3.26/Documentation/Configure.help 2.3.26-APM/Documentation/Configure.help
--- 2.3.26/Documentation/Configure.help Sun Nov  7 18:19:18 1999
+++ 2.3.26-APM/Documentation/Configure.help     Mon Nov  8 01:16:01 1999
@@ -10094,17 +10094,6 @@
   backlight at all, or it might print a lot of errors to the console,
   especially if you are using gpm.
 
-Power off on shutdown 
-CONFIG_APM_POWER_OFF
-  Enable the ability to power off the computer after the Linux kernel
-  is halted. You will need software (e.g., a suitable version of the
-  halt(8) command ("man 8 halt")) to cause the computer to power down.
-  Recent versions of the sysvinit package available from
-  ftp://metalab.unc.edu/pub/Linux/system/daemons/init/ contain support
-  for this ("halt -p" shuts down Linux and powers off the computer, if
-  executed from runlevel 0). As with the other APM options, this
-  option may not work reliably with some APM BIOS implementations.
-
 Ignore multiple suspend/standby events
 CONFIG_APM_IGNORE_MULTIPLE_SUSPEND
   This option is necessary on the IBM Thinkpad 560, but should work on
diff -ruN 2.3.26/arch/i386/kernel/apm.c 2.3.26-APM/arch/i386/kernel/apm.c
--- 2.3.26/arch/i386/kernel/apm.c       Sun Nov  7 18:19:18 1999
+++ 2.3.26-APM/arch/i386/kernel/apm.c   Mon Nov  8 01:16:01 1999
@@ -150,7 +150,9 @@
 
 extern unsigned long get_cmos_time(void);
 
+#ifdef CONFIG_MAGIC_SYSRQ
 extern void (*sysrq_power_off)(void);
+#endif
 
 /*
  * The apm_bios device is one of the misc char devices.
@@ -1367,7 +1369,9 @@
        /* Install our power off handler.. */
        if (power_off_enabled)
                acpi_power_off = apm_power_off;
+#ifdef CONFIG_MAGIC_SYSRQ
        sysrq_power_off = apm_power_off;
+#endif
 
        apm_mainloop();
        return 0;

Reply via email to