public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: "Brown, Len" <len.brown@intel.com>
Cc: linux-acpi@vger.kernel.org, borislav@users.sf.net,
	linux-thinkpad@linux-thinkpad.org, Raymund Will <rw@suse.de>
Subject: [PATCH] Fix Thinkpad A21m shutdown
Date: Wed, 12 Apr 2006 15:32:12 +0200	[thread overview]
Message-ID: <200604121532.13392.trenn@suse.de> (raw)

Subject: Fix Thinkpad A21m shutdown

The A21m Thinkpad (maybe also others) have a GDCK method and a DOCK device.
It seems that on others machines the GDCK is the docking device.
Installing the notify handler for a GDCK device fails.
When module is unloaded it is tried to remove the never installed
notify handler for the GDCK method which seems to freeze the machine.

Fix: Do not set notify_installed when installing the notify handler fails.

Signed-off-by: Thomas Renninger <trenn@suse.de>

 drivers/acpi/ibm_acpi.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Index: linux-2.6.16/drivers/acpi/ibm_acpi.c
===================================================================
--- linux-2.6.16.orig/drivers/acpi/ibm_acpi.c
+++ linux-2.6.16/drivers/acpi/ibm_acpi.c
@@ -1716,12 +1716,12 @@ static int __init setup_notify(struct ib
 	int ret;
 
 	if (!*ibm->handle)
-		return 0;
+		return 1;
 
 	ret = acpi_bus_get_device(*ibm->handle, &ibm->device);
 	if (ret < 0) {
 		printk(IBM_ERR "%s device not present\n", ibm->name);
-		return 0;
+		return 1;
 	}
 
 	acpi_driver_data(ibm->device) = ibm;
@@ -1811,6 +1811,8 @@ static int __init ibm_init(struct ibm_st
 		ret = setup_notify(ibm);
 		if (ret < 0)
 			return ret;
+		if (ret > 0)
+			return 0;
 		ibm->notify_installed = 1;
 	}
 

             reply	other threads:[~2006-04-12 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-12 13:32 Thomas Renninger [this message]
2006-04-12 21:40 ` [PATCH] Fix Thinkpad A21m shutdown Borislav Deianov

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=200604121532.13392.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=borislav@users.sf.net \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-thinkpad@linux-thinkpad.org \
    --cc=rw@suse.de \
    /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