Skip to content

Commit cd254f2

Browse files
author
Robert Richter
committed
oprofile: make !CONFIG_PM function stubs static inline
Make !CONFIG_PM function stubs static inline and remove section attribute. Signed-off-by: Robert Richter <robert.richter@amd.com>
1 parent b3b3a9b commit cd254f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/oprofile/oprofile_perf.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ static void oprofile_perf_stop(void)
190190
}
191191

192192
#ifdef CONFIG_PM
193+
193194
static int oprofile_perf_suspend(struct platform_device *dev, pm_message_t state)
194195
{
195196
mutex_lock(&oprofile_perf_mutex);
@@ -241,9 +242,12 @@ static void exit_driverfs(void)
241242
platform_device_unregister(oprofile_pdev);
242243
platform_driver_unregister(&oprofile_driver);
243244
}
245+
244246
#else
245-
static int __init init_driverfs(void) { return 0; }
246-
#define exit_driverfs() do { } while (0)
247+
248+
static inline int init_driverfs(void) { return 0; }
249+
static inline void exit_driverfs(void) { }
250+
247251
#endif /* CONFIG_PM */
248252

249253
void oprofile_perf_exit(void)

0 commit comments

Comments
 (0)