From: Mathias Krause Date: Wed, 16 Jul 2014 17:43:07 +0000 (+0200) Subject: alienware-wmi: Mark DMI table as __initconst X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d997d88edff9f47f4939560823f656432d8bc821;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git alienware-wmi: Mark DMI table as __initconst The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released appropriately. In turn, the callback function can be marked with __init, too. Signed-off-by: Mathias Krause Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c index 297b6640213f..cdbaf3c5328a 100644 --- a/drivers/platform/x86/alienware-wmi.c +++ b/drivers/platform/x86/alienware-wmi.c @@ -71,13 +71,13 @@ static struct quirk_entry quirk_x51_family = { .num_zones = 3, }; -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; } -static struct dmi_system_id alienware_quirks[] = { +static const struct dmi_system_id alienware_quirks[] __initconst = { { .callback = dmi_matched, .ident = "Alienware X51 R1",