From 142d06490e248afb6c0764b242cbd5f0e8b0e17c Mon Sep 17 00:00:00 2001 From: kn Date: Thu, 20 Oct 2022 16:08:13 +0000 Subject: [PATCH] Constify global product table Looking for .rodata candidates in /bsd .data symbols, this one popped up: ffffffff82281b70 l O .data 0000000000001688 asmc_prods OK jung --- sys/dev/acpi/asmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpi/asmc.c b/sys/dev/acpi/asmc.c index c100ee2150a..15f039f2d9a 100644 --- a/sys/dev/acpi/asmc.c +++ b/sys/dev/acpi/asmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asmc.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ +/* $OpenBSD: asmc.c,v 1.5 2022/10/20 16:08:13 kn Exp $ */ /* * Copyright (c) 2015 Joerg Jung * @@ -75,7 +75,7 @@ struct asmc_softc { bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; - struct asmc_prod *sc_prod; + const struct asmc_prod *sc_prod; uint8_t sc_nfans; /* number of fans */ uint8_t sc_lightlen; /* light data len */ uint8_t sc_backlight; /* keyboard backlight value */ @@ -119,7 +119,7 @@ const char *asmc_hids[] = { "APP0001", NULL }; -static struct asmc_prod asmc_prods[] = { +static const struct asmc_prod asmc_prods[] = { { "MacBookAir", 1, { "TB0T", "TB1S", "TB1T", "TB2S", "TB2T", "TBXT", "TC0C", "TC0D", "TC0E", "TC0F", "TC0P", "TC1C", "TC1E", "TC2C", "TCFP", "TCGC", -- 2.20.1