Skip to content

Commit

Permalink
oprofile: make !CONFIG_PM function stubs static inline
Browse files Browse the repository at this point in the history
Make !CONFIG_PM function stubs static inline and remove section
attribute.

Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Robert Richter committed Oct 15, 2010
1 parent b3b3a9b commit cd254f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/oprofile/oprofile_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cd254f2

Please sign in to comment.