public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix ACPI multible power entries
@ 2001-11-09 12:01 Anders Peter Fugmann
  0 siblings, 0 replies; 4+ messages in thread
From: Anders Peter Fugmann @ 2001-11-09 12:01 UTC (permalink / raw)
  To: andrew.grover; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

Hi.

In trying to get ACPI to work on my system, i was stumbled to see two 
button entries under /proc/acpi/button/.

Attached is a patch which corrects this behaviour.
The patch applies to 2.4.14.

Regards
Anders Fugmann



[-- Attachment #2: acpi.diff --]
[-- Type: text/plain, Size: 1223 bytes --]

--- linux-2.4.14/drivers/acpi/ospm/button/bn_osl.c.orig	Thu Nov  8 21:03:35 2001
+++ linux-2.4.14/drivers/acpi/ospm/button/bn_osl.c	Fri Nov  9 12:52:57 2001
@@ -97,10 +97,13 @@
 			printk(KERN_WARNING "ACPI: Multiple power buttons detected, ignoring fixed-feature\n");
 		default:
 			printk(KERN_INFO "ACPI: Power Button (CM) found\n");
-			bn_power_button = BN_TYPE_GENERIC;
-			if (!proc_mkdir(BN_PROC_POWER_BUTTON, bn_proc_root)) {
-				status = AE_ERROR;
+			/* Only create proc entry, if it has not been created before */
+			if (!bn_power_button) {
+			      if (!proc_mkdir(BN_PROC_POWER_BUTTON, bn_proc_root)) {
+			            status = AE_ERROR;
+			      }
 			}
+			bn_power_button = BN_TYPE_GENERIC;
 			break;
 		}
 		break;
@@ -130,9 +133,13 @@
 		default:
 			bn_sleep_button = BN_TYPE_GENERIC;
 			printk(KERN_INFO "ACPI: Sleep Button (CM) found\n");
-			if (!proc_mkdir(BN_PROC_SLEEP_BUTTON, bn_proc_root)) {
-				status = AE_ERROR;
+			/* Only create proc entry, if it has not been created before */
+			if (!bn_sleep_button) {
+			      if (!proc_mkdir(BN_PROC_SLEEP_BUTTON, bn_proc_root)) {
+				    status = AE_ERROR;
+			      }
 			}
+			bn_sleep_button = BN_TYPE_GENERIC;
 			break;
 		}
 		break;

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: [PATCH] fix ACPI multible power entries
@ 2001-11-09 19:10 Grover, Andrew
  2001-11-09 19:17 ` Matthew Dharm
  2001-11-10 10:20 ` Anders Peter Fugmann
  0 siblings, 2 replies; 4+ messages in thread
From: Grover, Andrew @ 2001-11-09 19:10 UTC (permalink / raw)
  To: 'Anders Peter Fugmann'; +Cc: linux-kernel

We should already be handling multiple power button definitions, so I'm
confused why you're still seeing the problem. Could you please send me your
dmesg output and /proc/acpi/dsdt output?

Thanks -- Regards -- Andy

> -----Original Message-----
> From: Anders Peter Fugmann [mailto:afu@fugmann.dhs.org]
> Sent: Friday, November 09, 2001 4:01 AM
> To: andrew.grover@intel.com
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH] fix ACPI multible power entries
> Importance: High
> 
> 
> Hi.
> 
> In trying to get ACPI to work on my system, i was stumbled to see two 
> button entries under /proc/acpi/button/.
> 
> Attached is a patch which corrects this behaviour.
> The patch applies to 2.4.14.
> 
> Regards
> Anders Fugmann
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-10 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-09 12:01 [PATCH] fix ACPI multible power entries Anders Peter Fugmann
  -- strict thread matches above, loose matches on Subject: below --
2001-11-09 19:10 Grover, Andrew
2001-11-09 19:17 ` Matthew Dharm
2001-11-10 10:20 ` Anders Peter Fugmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox