dmi: Mark all struct dmi_system_id instances const

... and __initconst if applicable.

Based on similar work for an older kernel in the Grsecurity patch.

[JD: fix toshiba-wmi build]
[JD: add htcpen]
[JD: move __initconst where checkscript wants it]

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
This commit is contained in:
Christoph Hellwig 2017-09-14 11:59:30 +02:00 • committed by Jean Delvare
commit 6faadbbb7f
48 changed files with 52 additions and 52 deletions

View file

@ -973,7 +973,7 @@ static int __init enable_cap_knobs(const struct dmi_system_id *d)
return 0;
}
static struct dmi_system_id __initdata pm_dmi_table[] = {
static const struct dmi_system_id pm_dmi_table[] __initconst = {
{
enable_cap_knobs, "IBM Active Energy Manager",
{

View file

@ -1247,7 +1247,7 @@ static int applesmc_dmi_match(const struct dmi_system_id *id)
* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
* So we need to put "Apple MacBook Pro" before "Apple MacBook".
*/
static __initdata struct dmi_system_id applesmc_whitelist[] = {
static const struct dmi_system_id applesmc_whitelist[] __initconst = {
{ applesmc_dmi_match, "Apple MacBook Air", {
DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir") },

View file

@ -890,7 +890,7 @@ static const struct i8k_config_data i8k_config_data[] = {
},
};
static struct dmi_system_id i8k_dmi_table[] __initdata = {
static const struct dmi_system_id i8k_dmi_table[] __initconst = {
{
.ident = "Dell Inspiron",
.matches = {
@ -1013,7 +1013,7 @@ MODULE_DEVICE_TABLE(dmi, i8k_dmi_table);
* of affected Dell machines for which we disallow I8K_SMM_GET_FAN_TYPE call.
* See bug: https://bugzilla.kernel.org/show_bug.cgi?id=100121
*/
static struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initdata = {
static const struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initconst = {
{
.ident = "Dell Studio XPS 8000",
.matches = {