Skip to content

Commit

Permalink
ACPI / battery: mark DMI table as __initconst
Browse files Browse the repository at this point in the history
The bat_dmi_table[] DMI table is referenced from the __init function
acpi_battery_init_async() only. It and its referenced functions can
therefore be marked __initconst to free up ~1kB of runtime memory after
initialization is done.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
minipli authored and rafaeljw committed Jun 15, 2015
1 parent 27059b9 commit 048d16d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,19 +1124,21 @@ static int battery_notify(struct notifier_block *nb,
return 0;
}

static int battery_bix_broken_package_quirk(const struct dmi_system_id *d)
static int __init
battery_bix_broken_package_quirk(const struct dmi_system_id *d)
{
battery_bix_broken_package = 1;
return 0;
}

static int battery_notification_delay_quirk(const struct dmi_system_id *d)
static int __init
battery_notification_delay_quirk(const struct dmi_system_id *d)
{
battery_notification_delay_ms = 1000;
return 0;
}

static struct dmi_system_id bat_dmi_table[] = {
static const struct dmi_system_id bat_dmi_table[] __initconst = {
{
.callback = battery_bix_broken_package_quirk,
.ident = "NEC LZ750/LS",
Expand Down

0 comments on commit 048d16d

Please sign in to comment.