diff options
author | Mathias Krause <minipli@googlemail.com> | 2014-07-16 13:43:09 -0400 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2014-08-16 04:23:52 -0400 |
commit | 681480cc568627ab252a8e03edaa44e4d7ccfa81 (patch) | |
tree | 499794168b929569987f60b3931bfb6f6e83713e /drivers/platform/x86/dell-laptop.c | |
parent | 7e6c227cebeee59ffe37bccde698ad45f6210ef0 (diff) |
dell-laptop: Mark dell_quirks[] DMI table as __initconst
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>
Diffstat (limited to 'drivers/platform/x86/dell-laptop.c')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index fed4111ac31a..233d2ee598a6 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -70,7 +70,7 @@ static struct quirk_entry quirk_dell_vostro_v130 = { | |||
70 | .touchpad_led = 1, | 70 | .touchpad_led = 1, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static int dmi_matched(const struct dmi_system_id *dmi) | 73 | static int __init dmi_matched(const struct dmi_system_id *dmi) |
74 | { | 74 | { |
75 | quirks = dmi->driver_data; | 75 | quirks = dmi->driver_data; |
76 | return 1; | 76 | return 1; |
@@ -123,7 +123,7 @@ static const struct dmi_system_id dell_device_table[] __initconst = { | |||
123 | }; | 123 | }; |
124 | MODULE_DEVICE_TABLE(dmi, dell_device_table); | 124 | MODULE_DEVICE_TABLE(dmi, dell_device_table); |
125 | 125 | ||
126 | static struct dmi_system_id dell_quirks[] = { | 126 | static const struct dmi_system_id dell_quirks[] __initconst = { |
127 | { | 127 | { |
128 | .callback = dmi_matched, | 128 | .callback = dmi_matched, |
129 | .ident = "Dell Vostro V130", | 129 | .ident = "Dell Vostro V130", |
@@ -780,7 +780,7 @@ static struct led_classdev touchpad_led = { | |||
780 | .flags = LED_CORE_SUSPENDRESUME, | 780 | .flags = LED_CORE_SUSPENDRESUME, |
781 | }; | 781 | }; |
782 | 782 | ||
783 | static int touchpad_led_init(struct device *dev) | 783 | static int __init touchpad_led_init(struct device *dev) |
784 | { | 784 | { |
785 | return led_classdev_register(dev, &touchpad_led); | 785 | return led_classdev_register(dev, &touchpad_led); |
786 | } | 786 | } |