Skip to content

Commit

Permalink
fujitsu-laptop: Mark fujitsu_dmi_table[] DMI table as __initconst
Browse files Browse the repository at this point in the history
The DMI table is only ever used during initialization. Mark it as
__initconst so its memory can be released afterwards -- roughly 1.5 kB.
In turn, the callback functions can be marked with __init, too.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
minipli authored and Matthew Garrett committed Aug 16, 2014
1 parent 702ef54 commit fbe9b79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/platform/x86/fujitsu-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ static struct platform_driver fujitsupf_driver = {
}
};

static void dmi_check_cb_common(const struct dmi_system_id *id)
static void __init dmi_check_cb_common(const struct dmi_system_id *id)
{
pr_info("Identified laptop model '%s'\n", id->ident);
if (use_alt_lcd_levels == -1) {
Expand All @@ -577,23 +577,23 @@ static void dmi_check_cb_common(const struct dmi_system_id *id)
}
}

static int dmi_check_cb_s6410(const struct dmi_system_id *id)
static int __init dmi_check_cb_s6410(const struct dmi_system_id *id)
{
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
return 1;
}

static int dmi_check_cb_s6420(const struct dmi_system_id *id)
static int __init dmi_check_cb_s6420(const struct dmi_system_id *id)
{
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
return 1;
}

static int dmi_check_cb_p8010(const struct dmi_system_id *id)
static int __init dmi_check_cb_p8010(const struct dmi_system_id *id)
{
dmi_check_cb_common(id);
fujitsu->keycode1 = KEY_HELP; /* "Support" */
Expand All @@ -602,7 +602,7 @@ static int dmi_check_cb_p8010(const struct dmi_system_id *id)
return 1;
}

static struct dmi_system_id fujitsu_dmi_table[] = {
static const struct dmi_system_id fujitsu_dmi_table[] __initconst = {
{
.ident = "Fujitsu Siemens S6410",
.matches = {
Expand Down

0 comments on commit fbe9b79

Please sign in to comment.