The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=27d4c6f86e15e818c390dfc2f3bb6ddf50148e71

commit 27d4c6f86e15e818c390dfc2f3bb6ddf50148e71
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2022-05-04 14:44:54 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2022-05-04 15:31:01 +0000

    asmc: Make the model table const and local to asmc.c
    
    No functional change intended.
    
    MFC after:      2 weeks
---
 sys/dev/asmc/asmc.c    | 10 +++++-----
 sys/dev/asmc/asmcvar.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
index 9b94150a2593..912e8b3a0a64 100644
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -130,7 +130,7 @@ struct asmc_model {
        const char      *smc_tempdescs[ASMC_TEMP_MAX];
 };
 
-static struct asmc_model *asmc_match(device_t dev);
+static const struct asmc_model *asmc_match(device_t dev);
 
 #define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \
                        asmc_mb_sysctl_sms_z
@@ -153,7 +153,7 @@ static struct asmc_model *asmc_match(device_t dev);
 
 #define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL
 
-struct asmc_model asmc_models[] = {
+static const struct asmc_model asmc_models[] = {
        {
          "MacBook1,1", "Apple SMC MacBook Core Duo",
          ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL,
@@ -443,7 +443,7 @@ static unsigned int light_control = 0;
 DRIVER_MODULE(asmc, acpi, asmc_driver, asmc_devclass, NULL, NULL);
 MODULE_DEPEND(asmc, acpi, 1, 1, 1);
 
-static struct asmc_model *
+static const struct asmc_model *
 asmc_match(device_t dev)
 {
        int i;
@@ -467,7 +467,7 @@ asmc_match(device_t dev)
 static int
 asmc_probe(device_t dev)
 {
-       struct asmc_model *model;
+       const struct asmc_model *model;
        int rv;
 
        if (resource_disabled("asmc", 0))
@@ -495,7 +495,7 @@ asmc_attach(device_t dev)
        struct asmc_softc *sc = device_get_softc(dev);
        struct sysctl_ctx_list *sysctlctx;
        struct sysctl_oid *sysctlnode;
-       struct asmc_model *model;
+       const struct asmc_model *model;
 
        sc->sc_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
            &sc->sc_rid_port, RF_ACTIVE);
diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h
index 70a2b24889c7..d55259122132 100644
--- a/sys/dev/asmc/asmcvar.h
+++ b/sys/dev/asmc/asmcvar.h
@@ -42,7 +42,7 @@ struct asmc_softc {
        struct sysctl_oid       *sc_temp_tree;
        struct sysctl_oid       *sc_sms_tree;
        struct sysctl_oid       *sc_light_tree;
-       struct asmc_model       *sc_model;
+       const struct asmc_model *sc_model;
        int                     sc_rid_port;
        int                     sc_rid_irq;
        struct resource         *sc_ioport;

Reply via email to