Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm: fix section mismatch warning

Fix following warning:
WARNING: vmlinux.o(.init.text+0x32804): Section mismatch in reference from the function init_nsc() to the function .devexit.text:tpm_nsc_remove()

The function tpm_nsc_remove() are used outside __exit, so remove the __exit
annotation to make sure the function is always avilable.

Note: Trying to compare this module with other users of platform_device gve me
the impression that this driver needs some work to match other users.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kylene Hall <kjhall@us.ibm.com>
Cc: Marcel Selhorst <tpm@selhorst.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Sam Ravnborg and committed by
Linus Torvalds
4821cd11 f2b9a396

+1 -1
+1 -1
drivers/char/tpm/tpm_nsc.c
··· 264 264 265 265 static struct platform_device *pdev = NULL; 266 266 267 - static void __devexit tpm_nsc_remove(struct device *dev) 267 + static void tpm_nsc_remove(struct device *dev) 268 268 { 269 269 struct tpm_chip *chip = dev_get_drvdata(dev); 270 270 if ( chip ) {