Skip to contentSkip to conversation

Fix up wrong comments

PM Pavel Machek 2 participants 3 messages Jul 26, 2003 – Aug 5, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi!

This fixes add wrong comments, and adds comment about pitfalls of calling BIOS.

drivers/input/power.c +0 -4
Index: linux/drivers/input/power.c
===================================================================
@@ -45,9 +45,7 @@
 static int suspend_button_pushed = 0;
 static void suspend_button_task_handler(void *data)
 {
-        //extern void pm_do_suspend(void);
         udelay(200); /* debounce */
-        //pm_do_suspend();
         suspend_button_pushed = 0;
 }
 
@@ -67,8 +65,6 @@
 			case KEY_SUSPEND:
 				printk("Powering down entire device\n");
 
-				//pm_send_all(PM_SUSPEND, dev);
-
 				if (!suspend_button_pushed) {
                 			suspend_button_pushed = 1;
                         		schedule_work(&suspend_button_task);
drivers/acpi/sleep/main.c +0 -4
Index: linux/drivers/acpi/sleep/main.c
===================================================================
@@ -69,10 +81,6 @@
  * First, we call to the device driver layer to save device state.
  * Once we have that, we save whatevery processor and kernel state we
  * need to memory.
- * If we're entering S4, we then write the memory image to disk.
- *
- * Only then is it safe for us to power down devices, since we may need
- * the disks and upstream buses to write to.
  */
 acpi_status
 acpi_system_save_state(
include/linux/reboot.h +1 -1
Index: linux/include/linux/reboot.h
===================================================================
@@ -21,7 +21,7 @@
  * CAD_OFF     Ctrl-Alt-Del sequence sends SIGINT to init task.
  * POWER_OFF   Stop OS and remove all power from system, if possible.
  * RESTART2    Restart system using given command string.
- * SW_SUSPEND  Suspend system using Software Suspend if compiled in
+ * SW_SUSPEND  Suspend system using software suspend if compiled in.
  */
 
 #define	LINUX_REBOOT_CMD_RESTART	0x01234567
arch/i386/kernel/acpi/wakeup.S +5 -0
Index: linux/arch/i386/kernel/acpi/wakeup.S
===================================================================
@@ -43,6 +43,11 @@
 
 	testl	$1, video_flags - wakeup_code
 	jz	1f
+	/* It is miracle that this works:
+	   * PCI may or may not be initialized at this point
+	   * I'm told we should pass device ID to video bios
+	   However it works on some real machines...
+	 */
 	lcall   $0xc000,$3
 	movw	%cs, %ax
 	movw	%ax, %ds					# Bios might have played with that
Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#1 lore raw
Quoted 3 lines

This fixes add wrong comments, and adds comment about pitfalls of calling BIOS.

I didn't apply this, because I would rather see it described in a piece of real documentation (Documentation/swsusp.txt or e.g. Documentation/power/video.txt) and explained as much as possible.

Thanks,

-pat

#2 lore raw

Hi!

Quoted 6 lines
Quoted 2 lines

This fixes add wrong comments, and adds comment about pitfalls of calling BIOS.

I didn't apply this, because I would rather see it described in a piece of real documentation (Documentation/swsusp.txt or e.g. Documentation/power/video.txt) and explained as much as possible.

Okay, I'll do that.
Pavel

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]