diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-02-17 07:22:54 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-21 02:55:53 -0500 |
commit | 7560e385651c60e5ffdf07cb94fa7d1658ab0b7a (patch) | |
tree | a982d54b7541d5654fcd9a2e1d0db07ed85b585a /drivers/misc | |
parent | b95e9e8d94484c2823be67416f25e9756db149dc (diff) |
acer-wmi: fix section mismatch warnings
Fix following warnings:
WARNING: vmlinux.o(.text+0x672615): Section mismatch in reference from the function acer_platform_remove() to the function .exit.text:acer_backlight_exit()
WARNING: vmlinux.o(.devinit.text+0x1e859): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_led_init()
WARNING: vmlinux.o(.devinit.text+0x1e878): Section mismatch in reference from the function acer_platform_probe() to the function .init.text:acer_backlight_init()
Remove __exit annotation from acer_backlight_exit(). We cannot reference
a __exit annotated function from non __exit functions.
acer_led_init() and acer_backlight_init() where both annotated __init but
used from a __devinit function. This would result in an oops should
gcc drop their inlining and the module are hot plugged.
Fix by annotating acer_led_init() and acer_backlight_init() __devinit.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/acer-wmi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index d7aea93081f2..cdc733b77fe3 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
@@ -756,7 +756,7 @@ static struct led_classdev mail_led = { | |||
756 | .brightness_set = mail_led_set, | 756 | .brightness_set = mail_led_set, |
757 | }; | 757 | }; |
758 | 758 | ||
759 | static int __init acer_led_init(struct device *dev) | 759 | static int __devinit acer_led_init(struct device *dev) |
760 | { | 760 | { |
761 | return led_classdev_register(dev, &mail_led); | 761 | return led_classdev_register(dev, &mail_led); |
762 | } | 762 | } |
@@ -789,7 +789,7 @@ static struct backlight_ops acer_bl_ops = { | |||
789 | .update_status = update_bl_status, | 789 | .update_status = update_bl_status, |
790 | }; | 790 | }; |
791 | 791 | ||
792 | static int __init acer_backlight_init(struct device *dev) | 792 | static int __devinit acer_backlight_init(struct device *dev) |
793 | { | 793 | { |
794 | struct backlight_device *bd; | 794 | struct backlight_device *bd; |
795 | 795 | ||
@@ -808,7 +808,7 @@ static int __init acer_backlight_init(struct device *dev) | |||
808 | return 0; | 808 | return 0; |
809 | } | 809 | } |
810 | 810 | ||
811 | static void __exit acer_backlight_exit(void) | 811 | static void acer_backlight_exit(void) |
812 | { | 812 | { |
813 | backlight_device_unregister(acer_backlight_device); | 813 | backlight_device_unregister(acer_backlight_device); |
814 | } | 814 | } |