]> git.karo-electronics.de Git - linux-beck.git/commitdiff
oprofile: fix linker errors
authorAnand Gadiyar <gadiyar@ti.com>
Thu, 14 Oct 2010 15:31:42 +0000 (11:31 -0400)
committerRobert Richter <robert.richter@amd.com>
Fri, 15 Oct 2010 10:45:44 +0000 (12:45 +0200)
Commit e9677b3ce (oprofile, ARM: Use oprofile_arch_exit() to
cleanup on failure) caused oprofile_perf_exit to be called
in the cleanup path of oprofile_perf_init. The __exit tag
for oprofile_perf_exit should therefore be dropped.

The same has to be done for exit_driverfs as well, as this
function is called from oprofile_perf_exit. Else, we get
the following two linker errors.

  LD      .tmp_vmlinux1
`oprofile_perf_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1

  LD      .tmp_vmlinux1
`exit_driverfs' referenced in section `.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
drivers/oprofile/oprofile_perf.c
include/linux/oprofile.h

index e707a72a37999df7b9fd564b21ffc8a4289b221a..36ec67e3d91dc7c0514bf2a9ccef2bac6cfd2d16 100644 (file)
@@ -236,7 +236,7 @@ static int __init init_driverfs(void)
        return ret;
 }
 
-static void __exit exit_driverfs(void)
+static void exit_driverfs(void)
 {
        platform_device_unregister(oprofile_pdev);
        platform_driver_unregister(&oprofile_driver);
index d67a8330b41e99eb835eda23d5cbbc55fa8667e5..32fb81212fd153c0a71ba347ead6429d0a8dcd06 100644 (file)
@@ -188,7 +188,7 @@ int oprofile_write_commit(struct op_entry *entry);
 
 #ifdef CONFIG_PERF_EVENTS
 int __init oprofile_perf_init(struct oprofile_operations *ops);
-void __exit oprofile_perf_exit(void);
+void oprofile_perf_exit(void);
 char *op_name_from_perf_id(void);
 #endif /* CONFIG_PERF_EVENTS */