[PATCH] acpi: fix section mismatch warning in asus_acpi.o

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Ravnborg
Date: Thursday, May 31, 2007 - 1:24 pm

Fix following section mismatch warning in asus_acpi.o:

WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module')

The exit function is used in the init function during an error codition.
As __exit may be discarded during link-time / run-time this is no good.
Do not mark the exit function __exit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
Note: This warning is only generated by a local copy of modpost
      but it will soon hit upstream.

	Sam

diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index b770dea..6d7d415 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1357,7 +1357,7 @@ static struct backlight_ops asus_backlight_data = {
         .update_status  = set_brightness_status,
 };
 
-static void __exit asus_acpi_exit(void)
+static void asus_acpi_exit(void)
 {
 	if (asus_backlight_device)
 		backlight_device_unregister(asus_backlight_device);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 3:39 pm)
RE: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 4:31 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 4:53 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 5:09 pm)
RE: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Wed May 30, 8:19 pm)
[PATCH] net/hp100: fix section mismatch warning, Sam Ravnborg, (Thu May 31, 1:08 pm)
[PATCH] acpi: fix section mismatch warning in asus_acpi.o, Sam Ravnborg, (Thu May 31, 1:24 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Thu May 31, 1:42 pm)
[PATCH] isdn: fix section mismatch warnings, Sam Ravnborg, (Thu May 31, 1:46 pm)
[PATCH] microcode: fix section mismatch warning, Sam Ravnborg, (Thu May 31, 1:51 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Thu May 31, 9:05 pm)
Re: BUG: sleeping function called from invalid context at ..., Christoph Lameter, (Thu May 31, 9:45 pm)
linux-ia64 build warning messages, Russ Anderson, (Tue Jun 5, 7:55 am)
Re: linux-ia64 build warning messages, Peter Chubb, (Wed Jun 6, 10:00 pm)