mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@zip.com.au>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: [patch] call device_shutdown with interrupts enabled
Date: Sun, 3 Jul 2005 23:49:29 +0200	[thread overview]
Message-ID: <20050703214929.GA9214@elf.ucw.cz> (raw)

Do not call device_shutdown with interrupts disabled. It is wrong and
produces ugly warnings.

Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit 325107c7d4a5a28dee6eecce1ee8fa01753414c7
tree ea824a39656ae9da70f6738e9452b1ac7b561ab3
parent b61ea835309d0fb87cf1c7a2d83d5832ae8eb116
author <pavel@amd.(none)> Sun, 03 Jul 2005 23:48:35 +0200
committer <pavel@amd.(none)> Sun, 03 Jul 2005 23:48:35 +0200

 kernel/power/disk.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/power/disk.c b/kernel/power/disk.c
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -50,19 +50,21 @@ static void power_down(suspend_disk_meth
 	unsigned long flags;
 	int error = 0;
 
-	local_irq_save(flags);
 	switch(mode) {
 	case PM_DISK_PLATFORM:
- 		device_shutdown();
+		device_shutdown();
+		local_irq_save(flags);
 		error = pm_ops->enter(PM_SUSPEND_DISK);
 		break;
 	case PM_DISK_SHUTDOWN:
 		printk("Powering off system\n");
 		device_shutdown();
+		local_irq_save(flags);
 		machine_power_off();
 		break;
 	case PM_DISK_REBOOT:
 		device_shutdown();
+		local_irq_save(flags);
 		machine_restart(NULL);
 		break;
 	}

-- 
teflon -- maybe it is a trademark, but it should not be.

             reply	other threads:[~2005-07-03 21:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-03 21:49 Pavel Machek [this message]
2005-07-04  6:33 ` Stefan Seyfried
2005-07-04  7:35   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050703214929.GA9214@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®