oprofile: make !CONFIG_PM function stubs static inline
authorRobert Richter <robert.richter@amd.com>
Fri, 15 Oct 2010 09:28:07 +0000 (11:28 +0200)
committerRobert Richter <robert.richter@amd.com>
Fri, 15 Oct 2010 10:47:18 +0000 (12:47 +0200)
Make !CONFIG_PM function stubs static inline and remove section
attribute.

Signed-off-by: Robert Richter <robert.richter@amd.com>
drivers/oprofile/oprofile_perf.c

index 36ec67e3d91dc7c0514bf2a9ccef2bac6cfd2d16..9046f7b2ed79f7a52354a2dbe45db20310cdca65 100644 (file)
@@ -190,6 +190,7 @@ static void oprofile_perf_stop(void)
 }
 
 #ifdef CONFIG_PM
+
 static int oprofile_perf_suspend(struct platform_device *dev, pm_message_t state)
 {
        mutex_lock(&oprofile_perf_mutex);
@@ -241,9 +242,12 @@ static void exit_driverfs(void)
        platform_device_unregister(oprofile_pdev);
        platform_driver_unregister(&oprofile_driver);
 }
+
 #else
-static int __init init_driverfs(void) { return 0; }
-#define exit_driverfs() do { } while (0)
+
+static inline int  init_driverfs(void) { return 0; }
+static inline void exit_driverfs(void) { }
+
 #endif /* CONFIG_PM */
 
 void oprofile_perf_exit(void)