[ltp] [PATCH] ibm_acpi: allow clean removal

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Fri, 27 Oct 2006 20:06:42 -0300


This patch is important if you use ibm-acpi as a module and ever unload it.
It has not been merged into 2.6.19-rc yet.

It applies to 2.6.18 and 2.6.19.  Older kernels not tested.

From: Alexey Starikovskiy <alexey_y_starikovskiy@linux.intel.com>
Date: Wed, 25 Oct 2006 14:29:04 +0000 (+0400)
Subject: ACPI: ibm_acpi: allow clean removal
X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/lenb/linux-acpi-2.6.git;a=commitdiff;h=d4a82b0b566fc2784648c9751f0deb2b262c95ea

ACPI: ibm_acpi: allow clean removal

Allow clean removal by setting notify_installed in the right place.

Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---

--- a/drivers/acpi/ibm_acpi.c
+++ b/drivers/acpi/ibm_acpi.c
@@ -1834,7 +1834,7 @@ static int __init setup_notify(struct ib
 		       ibm->name, status);
 		return -ENODEV;
 	}
-
+	ibm->notify_installed = 1;
 	return 0;
 }
 
@@ -1911,7 +1911,6 @@ static int __init ibm_init(struct ibm_st
 		ret = setup_notify(ibm);
 		if (ret < 0)
 			return ret;
-		ibm->notify_installed = 1;
 	}
 
 	return 0;
-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh