Skip to content

Commit

Permalink
PM: sleep: core: mark 2 functions as __init to save some memory
Browse files Browse the repository at this point in the history
'early_resume_init()' and 'late_resume_init() 'are only called respectively
via 'early_resume_init' and 'late_resume_init'.

They can be marked as __init to save a few bytes of memory.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Christophe JAILLET authored and Rafael J. Wysocki committed Jun 23, 2020

Unverified

No user is associated with the committer email.
1 parent 4877846 commit 0659d42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/power/trace.c
Original file line number Diff line number Diff line change
@@ -265,14 +265,14 @@ static struct notifier_block pm_trace_nb = {
.notifier_call = pm_trace_notify,
};

static int early_resume_init(void)
static int __init early_resume_init(void)
{
hash_value_early_read = read_magic_time();
register_pm_notifier(&pm_trace_nb);
return 0;
}

static int late_resume_init(void)
static int __init late_resume_init(void)
{
unsigned int val = hash_value_early_read;
unsigned int user, file, dev;

0 comments on commit 0659d42

Please sign in to comment.