dell-laptop: Mark dell_quirks[] DMI table as __initconst
authorMathias Krause <minipli@googlemail.com>
Wed, 16 Jul 2014 17:43:09 +0000 (19:43 +0200)
committerMatthew Garrett <matthew.garrett@nebula.com>
Sat, 16 Aug 2014 08:23:52 +0000 (01:23 -0700)
The dell_quirks[] DMI table is only ever used during initialization.
Mark it as __initconst so its memory can be released afterwards --
roughly 5.7 kB. In turn, the callback function can be marked with
__init, too.

Also the touchpad_led_init() function can be marked __init as it's only
referenced from dell_init() -- an __init function.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/dell-laptop.c

index fed4111ac31a6d6fbff0c02a6be563485ccec7dc..233d2ee598a62cdb5c1b05cc0ef77737cb48f98a 100644 (file)
@@ -70,7 +70,7 @@ static struct quirk_entry quirk_dell_vostro_v130 = {
        .touchpad_led = 1,
 };
 
-static int dmi_matched(const struct dmi_system_id *dmi)
+static int __init dmi_matched(const struct dmi_system_id *dmi)
 {
        quirks = dmi->driver_data;
        return 1;
@@ -123,7 +123,7 @@ static const struct dmi_system_id dell_device_table[] __initconst = {
 };
 MODULE_DEVICE_TABLE(dmi, dell_device_table);
 
-static struct dmi_system_id dell_quirks[] = {
+static const struct dmi_system_id dell_quirks[] __initconst = {
        {
                .callback = dmi_matched,
                .ident = "Dell Vostro V130",
@@ -780,7 +780,7 @@ static struct led_classdev touchpad_led = {
        .flags = LED_CORE_SUSPENDRESUME,
 };
 
-static int touchpad_led_init(struct device *dev)
+static int __init touchpad_led_init(struct device *dev)
 {
        return led_classdev_register(dev, &touchpad_led);
 }
This page took 0.025339 seconds and 5 git commands to generate.