From: kn Date: Thu, 20 Oct 2022 16:08:13 +0000 (+0000) Subject: Constify global product table X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=142d06490e248afb6c0764b242cbd5f0e8b0e17c;p=openbsd 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 --- 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",