From: naddy Date: Fri, 8 Apr 2022 15:02:28 +0000 (+0000) Subject: lm, uguru, fins, wbenv: constify sensor tables X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d095f71341fedbadd002e8f3b7308751f716f065;p=openbsd lm, uguru, fins, wbenv: constify sensor tables ok miod@ --- diff --git a/sys/dev/i2c/w83l784r.c b/sys/dev/i2c/w83l784r.c index a813447ec95..fd1c8713d18 100644 --- a/sys/dev/i2c/w83l784r.c +++ b/sys/dev/i2c/w83l784r.c @@ -1,4 +1,4 @@ -/* $OpenBSD: w83l784r.c,v 1.13 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: w83l784r.c,v 1.14 2022/04/08 15:02:28 naddy Exp $ */ /* * Copyright (c) 2006 Mark Kettenis @@ -80,14 +80,14 @@ struct wbenv_softc { struct ksensor sc_sensors[WBENV_MAX_SENSORS]; struct ksensordev sc_sensordev; - struct wbenv_sensor *sc_wbenv_sensors; + const struct wbenv_sensor *sc_wbenv_sensors; int sc_numsensors; }; int wbenv_match(struct device *, void *, void *); void wbenv_attach(struct device *, struct device *, void *); -void wbenv_setup_sensors(struct wbenv_softc *, struct wbenv_sensor *); +void wbenv_setup_sensors(struct wbenv_softc *, const struct wbenv_sensor *); void wbenv_refresh(void *); void w83l784r_refresh_volt(struct wbenv_softc *, int); @@ -108,7 +108,7 @@ struct cfdriver wbenv_cd = { NULL, "wbenv", DV_DULL }; -struct wbenv_sensor w83l784r_sensors[] = +const struct wbenv_sensor w83l784r_sensors[] = { { "VCore", SENSOR_VOLTS_DC, W83L784R_VCORE, w83l784r_refresh_volt, RFACT_NONE }, { "VBAT", SENSOR_VOLTS_DC, W83L784R_VBAT, w83l784r_refresh_volt, RFACT(232, 99) }, @@ -123,7 +123,7 @@ struct wbenv_sensor w83l784r_sensors[] = { NULL } }; -struct wbenv_sensor w83l785r_sensors[] = +const struct wbenv_sensor w83l785r_sensors[] = { { "VCore", SENSOR_VOLTS_DC, W83L784R_VCORE, w83l785r_refresh_volt, RFACT_NONE }, { "+2.5V", SENSOR_VOLTS_DC, W83L785R_2_5V, w83l785r_refresh_volt, RFACT(100, 100) }, @@ -137,7 +137,7 @@ struct wbenv_sensor w83l785r_sensors[] = { NULL } }; -struct wbenv_sensor w83l785ts_l_sensors[] = +const struct wbenv_sensor w83l785ts_l_sensors[] = { { "", SENSOR_TEMP, W83L784R_TEMP1, wbenv_refresh_temp }, @@ -236,7 +236,7 @@ wbenv_attach(struct device *parent, struct device *self, void *aux) } void -wbenv_setup_sensors(struct wbenv_softc *sc, struct wbenv_sensor *sensors) +wbenv_setup_sensors(struct wbenv_softc *sc, const struct wbenv_sensor *sensors) { int i; diff --git a/sys/dev/ic/lm78.c b/sys/dev/ic/lm78.c index 88538623a7a..e60f38577a6 100644 --- a/sys/dev/ic/lm78.c +++ b/sys/dev/ic/lm78.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78.c,v 1.25 2019/12/17 01:34:59 mortimer Exp $ */ +/* $OpenBSD: lm78.c,v 1.26 2022/04/08 15:02:28 naddy Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -51,7 +51,7 @@ int lm_match(struct lm_softc *); int wb_match(struct lm_softc *); int def_match(struct lm_softc *); -void lm_setup_sensors(struct lm_softc *, struct lm_sensor *); +void lm_setup_sensors(struct lm_softc *, const struct lm_sensor *); void lm_refresh(void *); void lm_refresh_sensor_data(struct lm_softc *); @@ -74,13 +74,13 @@ struct lm_chip { int (*chip_match)(struct lm_softc *); }; -struct lm_chip lm_chips[] = { +const struct lm_chip lm_chips[] = { { wb_match }, { lm_match }, { def_match } /* Must be last */ }; -struct lm_sensor lm78_sensors[] = { +const struct lm_sensor lm78_sensors[] = { /* Voltage */ { "VCore A", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VCore B", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, @@ -101,7 +101,7 @@ struct lm_sensor lm78_sensors[] = { { NULL } }; -struct lm_sensor w83627hf_sensors[] = { +const struct lm_sensor w83627hf_sensors[] = { /* Voltage */ { "VCore A", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VCore B", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, @@ -133,7 +133,7 @@ struct lm_sensor w83627hf_sensors[] = { * need special treatment, also because the reference voltage is 2.048 V * instead of the traditional 3.6 V. */ -struct lm_sensor w83627ehf_sensors[] = { +const struct lm_sensor w83627ehf_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE / 2}, { "+12V", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT(56, 10) / 2 }, @@ -163,7 +163,7 @@ struct lm_sensor w83627ehf_sensors[] = { * w83627dhg is almost identical to w83627ehf, except that * it has 9 instead of 10 voltage sensors */ -struct lm_sensor w83627dhg_sensors[] = { +const struct lm_sensor w83627dhg_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE / 2}, { "+12V", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT(56, 10) / 2 }, @@ -188,7 +188,7 @@ struct lm_sensor w83627dhg_sensors[] = { { NULL } }; -struct lm_sensor nct6776f_sensors[] = { +const struct lm_sensor nct6776f_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE / 2}, { "+12V", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT(56, 10) / 2 }, @@ -216,7 +216,7 @@ struct lm_sensor nct6776f_sensors[] = { }; /* NCT6779D */ -struct lm_sensor nct6779d_sensors[] = { +const struct lm_sensor nct6779d_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 4, 0x80, lm_refresh_volt, RFACT_NONE }, { "VIN1", SENSOR_VOLTS_DC, 4, 0x81, lm_refresh_volt, RFACT(56, 10) / 2 }, @@ -252,7 +252,7 @@ struct lm_sensor nct6779d_sensors[] = { { NULL } }; -struct lm_sensor w83637hf_sensors[] = { +const struct lm_sensor w83637hf_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, wb_w83637hf_refresh_vcore }, { "+12V", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT(28, 10) }, @@ -275,7 +275,7 @@ struct lm_sensor w83637hf_sensors[] = { { NULL } }; -struct lm_sensor w83697hf_sensors[] = { +const struct lm_sensor w83697hf_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "+3.3V", SENSOR_VOLTS_DC, 0, 0x22, lm_refresh_volt, RFACT_NONE }, @@ -302,7 +302,7 @@ struct lm_sensor w83697hf_sensors[] = { * +5V, but using the values from the W83782D datasheets seems to * provide sensible results. */ -struct lm_sensor w83781d_sensors[] = { +const struct lm_sensor w83781d_sensors[] = { /* Voltage */ { "VCore A", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VCore B", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, @@ -325,7 +325,7 @@ struct lm_sensor w83781d_sensors[] = { { NULL } }; -struct lm_sensor w83782d_sensors[] = { +const struct lm_sensor w83782d_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VINR0", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, @@ -350,7 +350,7 @@ struct lm_sensor w83782d_sensors[] = { { NULL } }; -struct lm_sensor w83783s_sensors[] = { +const struct lm_sensor w83783s_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "+3.3V", SENSOR_VOLTS_DC, 0, 0x22, lm_refresh_volt, RFACT_NONE }, @@ -371,7 +371,7 @@ struct lm_sensor w83783s_sensors[] = { { NULL } }; -struct lm_sensor w83791d_sensors[] = { +const struct lm_sensor w83791d_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, 10000 }, { "VINR0", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, 10000 }, @@ -399,7 +399,7 @@ struct lm_sensor w83791d_sensors[] = { { NULL } }; -struct lm_sensor w83792d_sensors[] = { +const struct lm_sensor w83792d_sensors[] = { /* Voltage */ { "VCore A", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VCore B", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, @@ -428,7 +428,7 @@ struct lm_sensor w83792d_sensors[] = { { NULL } }; -struct lm_sensor as99127f_sensors[] = { +const struct lm_sensor as99127f_sensors[] = { /* Voltage */ { "VCore A", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VCore B", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, @@ -662,7 +662,7 @@ wb_match(struct lm_softc *sc) } void -lm_setup_sensors(struct lm_softc *sc, struct lm_sensor *sensors) +lm_setup_sensors(struct lm_softc *sc, const struct lm_sensor *sensors) { int i; diff --git a/sys/dev/ic/lm78var.h b/sys/dev/ic/lm78var.h index 374b208bf81..c3e1b84e00f 100644 --- a/sys/dev/ic/lm78var.h +++ b/sys/dev/ic/lm78var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78var.h,v 1.19 2019/12/17 01:34:59 mortimer Exp $ */ +/* $OpenBSD: lm78var.h,v 1.20 2022/04/08 15:02:28 naddy Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -142,7 +142,7 @@ struct lm_softc { struct ksensor sensors[WB_MAX_SENSORS]; struct ksensordev sensordev; struct sensor_task *sensortask; - struct lm_sensor *lm_sensors; + const struct lm_sensor *lm_sensors; u_int numsensors; void (*refresh_sensor_data) (struct lm_softc *); diff --git a/sys/dev/isa/fins.c b/sys/dev/isa/fins.c index 7261317d34c..ae254813dbd 100644 --- a/sys/dev/isa/fins.c +++ b/sys/dev/isa/fins.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fins.c,v 1.5 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: fins.c,v 1.6 2022/04/08 15:02:28 naddy Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -111,7 +111,7 @@ struct fins_softc { struct ksensor fins_ksensors[FINS_MAX_SENSORS]; struct ksensordev fins_sensordev; struct sensor_task *fins_sensortask; - struct fins_sensor *fins_sensors; + const struct fins_sensor *fins_sensors; bus_space_handle_t sc_ioh_sens; bus_space_handle_t sc_ioh_wdog; @@ -139,7 +139,7 @@ static __inline u_int16_t fins_read_sens_2(struct fins_softc *, int); static __inline u_int8_t fins_read_wdog(struct fins_softc *, int); static __inline void fins_write_wdog(struct fins_softc *, int, u_int8_t); -void fins_setup_sensors(struct fins_softc *, struct fins_sensor *); +void fins_setup_sensors(struct fins_softc *, const struct fins_sensor *); void fins_refresh(void *); void fins_get_rpm(struct fins_softc *, int); @@ -160,7 +160,7 @@ struct cfdriver fins_cd = { NULL, "fins", DV_DULL }; -struct fins_sensor fins_71805_sensors[] = { +const struct fins_sensor fins_71805_sensors[] = { { "+3.3V", fins_get_volt, SENSOR_VOLTS_DC, FRFACT(100, 100), 0x10 }, { "Vtt", fins_get_volt, SENSOR_VOLTS_DC, FRFACT_NONE, 0x11 }, { "Vram", fins_get_volt, SENSOR_VOLTS_DC, FRFACT(100, 100), 0x12 }, @@ -184,7 +184,7 @@ struct fins_sensor fins_71805_sensors[] = { { NULL } }; -struct fins_sensor fins_71882_sensors[] = { +const struct fins_sensor fins_71882_sensors[] = { { "+3.3V", fins_get_volt, SENSOR_VOLTS_DC, FRFACT(100, 100), 0x20 }, { "Vcore", fins_get_volt, SENSOR_VOLTS_DC, FRFACT_NONE, 0x21 }, { "Vram", fins_get_volt, SENSOR_VOLTS_DC, FRFACT(100, 100), 0x22 }, @@ -384,7 +384,7 @@ fins_lock(bus_space_tag_t iot, bus_space_handle_t ioh) } void -fins_setup_sensors(struct fins_softc *sc, struct fins_sensor *sensors) +fins_setup_sensors(struct fins_softc *sc, const struct fins_sensor *sensors) { int i; @@ -431,7 +431,7 @@ void fins_get_volt(struct fins_softc *sc, int n) { struct ksensor *sensor = &sc->fins_ksensors[n]; - struct fins_sensor *fs = &sc->fins_sensors[n]; + const struct fins_sensor *fs = &sc->fins_sensors[n]; int data; data = fins_read_sens(sc, fs->fs_reg); @@ -449,7 +449,7 @@ void fins_get_temp(struct fins_softc *sc, int n) { struct ksensor *sensor = &sc->fins_ksensors[n]; - struct fins_sensor *fs = &sc->fins_sensors[n]; + const struct fins_sensor *fs = &sc->fins_sensors[n]; u_int data; u_int max; @@ -477,7 +477,7 @@ void fins_refresh_offset(struct fins_softc *sc, int n) { struct ksensor *sensor = &sc->fins_ksensors[n]; - struct fins_sensor *fs = &sc->fins_sensors[n]; + const struct fins_sensor *fs = &sc->fins_sensors[n]; u_int data; sensor->flags &= ~SENSOR_FINVALID; @@ -492,7 +492,7 @@ void fins_get_rpm(struct fins_softc *sc, int n) { struct ksensor *sensor = &sc->fins_ksensors[n]; - struct fins_sensor *fs = &sc->fins_sensors[n]; + const struct fins_sensor *fs = &sc->fins_sensors[n]; int data; data = fins_read_sens_2(sc, fs->fs_reg); diff --git a/sys/dev/isa/uguru.c b/sys/dev/isa/uguru.c index 80612b18f49..91db92d1ed2 100644 --- a/sys/dev/isa/uguru.c +++ b/sys/dev/isa/uguru.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uguru.c,v 1.6 2022/04/06 18:59:29 naddy Exp $ */ +/* $OpenBSD: uguru.c,v 1.7 2022/04/08 15:02:28 naddy Exp $ */ /* * Copyright (c) 2010 Mikko Tolmunen @@ -100,7 +100,7 @@ struct uguru_softc { struct ksensor sc_sensors[UGURU_MAX_SENSORS]; struct ksensordev sc_sensordev; int sc_numsensors; - struct uguru_sensor *uguru_sensors; + const struct uguru_sensor *uguru_sensors; struct { uint8_t reading; /* uint8_t flags; */ @@ -126,7 +126,7 @@ void uguru_refresh_fan(struct uguru_softc *, int); #define UGURU_R_VOLT uguru_refresh_volt #define UGURU_R_FAN uguru_refresh_fan -struct uguru_sensor abitkv_sensors[] = { +const struct uguru_sensor abitkv_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x0f }, @@ -148,7 +148,7 @@ struct uguru_sensor abitkv_sensors[] = { { NULL } }; -struct uguru_sensor abitaa_sensors[] = { +const struct uguru_sensor abitaa_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM1", SENSOR_TEMP, UGURU_R_TEMP, 0x0f }, @@ -174,7 +174,7 @@ struct uguru_sensor abitaa_sensors[] = { { NULL } }; -struct uguru_sensor abitav_sensors[] = { +const struct uguru_sensor abitav_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x0f }, @@ -200,7 +200,7 @@ struct uguru_sensor abitav_sensors[] = { { NULL } }; -struct uguru_sensor abitas_sensors[] = { +const struct uguru_sensor abitas_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x0f }, @@ -226,7 +226,7 @@ struct uguru_sensor abitas_sensors[] = { { NULL } }; -struct uguru_sensor abitax_sensors[] = { +const struct uguru_sensor abitax_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x0f }, @@ -250,7 +250,7 @@ struct uguru_sensor abitax_sensors[] = { { NULL } }; -struct uguru_sensor abitm4_sensors[] = { +const struct uguru_sensor abitm4_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM1", SENSOR_TEMP, UGURU_R_TEMP, 0x02 }, @@ -278,7 +278,7 @@ struct uguru_sensor abitm4_sensors[] = { { NULL } }; -struct uguru_sensor abitan_sensors[] = { +const struct uguru_sensor abitan_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x00 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x01 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x0f }, @@ -305,7 +305,7 @@ struct uguru_sensor abitan_sensors[] = { { NULL } }; -struct uguru_sensor abital_sensors[] = { +const struct uguru_sensor abital_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -331,7 +331,7 @@ struct uguru_sensor abital_sensors[] = { { NULL } }; -struct uguru_sensor abitaw_sensors[] = { +const struct uguru_sensor abitaw_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM1", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -364,7 +364,7 @@ struct uguru_sensor abitaw_sensors[] = { { NULL } }; -struct uguru_sensor abitni_sensors[] = { +const struct uguru_sensor abitni_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -391,7 +391,7 @@ struct uguru_sensor abitni_sensors[] = { { NULL } }; -struct uguru_sensor abitat_sensors[] = { +const struct uguru_sensor abitat_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "NB", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -422,7 +422,7 @@ struct uguru_sensor abitat_sensors[] = { { NULL } }; -struct uguru_sensor abitan2_sensors[] = { +const struct uguru_sensor abitan2_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -449,7 +449,7 @@ struct uguru_sensor abitan2_sensors[] = { { NULL } }; -struct uguru_sensor abitab_sensors[] = { +const struct uguru_sensor abitab_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -477,7 +477,7 @@ struct uguru_sensor abitab_sensors[] = { { NULL } }; -struct uguru_sensor abitan3_sensors[] = { +const struct uguru_sensor abitan3_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -506,7 +506,7 @@ struct uguru_sensor abitan3_sensors[] = { { NULL } }; -struct uguru_sensor abitaw2_sensors[] = { +const struct uguru_sensor abitaw2_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM1", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -539,7 +539,7 @@ struct uguru_sensor abitaw2_sensors[] = { { NULL } }; -struct uguru_sensor abitat2_sensors[] = { +const struct uguru_sensor abitat2_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, { "PWM", SENSOR_TEMP, UGURU_R_TEMP, 0x1b }, @@ -569,7 +569,7 @@ struct uguru_sensor abitat2_sensors[] = { { NULL } }; -struct uguru_sensor abitab2_sensors[] = { +const struct uguru_sensor abitab2_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM1", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -601,7 +601,7 @@ struct uguru_sensor abitab2_sensors[] = { { NULL } }; -struct uguru_sensor abitin_sensors[] = { +const struct uguru_sensor abitin_sensors[] = { { "CPU", SENSOR_TEMP, UGURU_R_TEMP, 0x18 }, { "SYS", SENSOR_TEMP, UGURU_R_TEMP, 0x19 }, { "PWM1", SENSOR_TEMP, UGURU_R_TEMP, 0x1a }, @@ -694,7 +694,7 @@ uguru_attach(struct device *parent, struct device *self, void *aux) { struct uguru_softc *sc = (void *)self; struct isa_attach_args *ia = aux; - struct uguru_sensor *sensors; + const struct uguru_sensor *sensors; uint8_t data[9]; uint16_t vendid, devid, sysid; int i;