diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-01-21 20:25:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-22 01:34:31 -0500 |
commit | 2ad913babd5d597f9d9d71d9e93dd589d55e66cd (patch) | |
tree | c70c6d4f86f66eb3acb2ee5ecec95747c13ab78c /drivers/input | |
parent | a1f35ba374bc421ab33e40163be2b57995b09962 (diff) |
[SPARC64]: Fix section error in sparcspkr
With a sparc64 defconfig modified to set CONFIG_HOTPLUG=n
the following error happened during link of vmlinux:
local symbol 0: discarded in section `.devexit.text' from drivers/built-in.o
local symbol 1: discarded in section `.devexit.text' from drivers/built-in.o
(The error message above is from kbuild.git but it happens in mainline too)
The error happens becase there is a reference from .text/.data to a
function marked __devexit. With CONFIG_HOTPLUG=n all code marked
__devexit are discarded and the linker complains.
It was tracked down to sparcspkr.c which were missing __devexit_p()
around the function pointers.
Unfortunately modpost did not catch this since modpost do not warn
about references from .data to .devexit from variables named *_driver.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/sparcspkr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index a3637d870880..fed3c375ccf3 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -195,7 +195,7 @@ static struct of_platform_driver ebus_beep_driver = { | |||
195 | .name = "beep", | 195 | .name = "beep", |
196 | .match_table = ebus_beep_match, | 196 | .match_table = ebus_beep_match, |
197 | .probe = ebus_beep_probe, | 197 | .probe = ebus_beep_probe, |
198 | .remove = sparcspkr_remove, | 198 | .remove = __devexit_p(sparcspkr_remove), |
199 | .shutdown = sparcspkr_shutdown, | 199 | .shutdown = sparcspkr_shutdown, |
200 | }; | 200 | }; |
201 | 201 | ||
@@ -236,7 +236,7 @@ static struct of_platform_driver isa_beep_driver = { | |||
236 | .name = "beep", | 236 | .name = "beep", |
237 | .match_table = isa_beep_match, | 237 | .match_table = isa_beep_match, |
238 | .probe = isa_beep_probe, | 238 | .probe = isa_beep_probe, |
239 | .remove = sparcspkr_remove, | 239 | .remove = __devexit_p(sparcspkr_remove), |
240 | .shutdown = sparcspkr_shutdown, | 240 | .shutdown = sparcspkr_shutdown, |
241 | }; | 241 | }; |
242 | 242 | ||