diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-03-22 16:55:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-03-22 16:55:32 +0000 |
commit | bfcfcc95f91a9ef756b3184426381561b7f4dc23 (patch) | |
tree | 86156fd65b4c74f4b929cb5bcd06ed881f46f591 /sys/dev/ic | |
parent | d0617786c492a05d286defedc41f1cac5a22411d (diff) |
split userland & kernel struct sensor/sensordev so that the addition
of new fields in the future is less disruptive. This is done similar
to how struct proc is handled for ps(1). ok jmc (man page changes)
tested fkr simon, and more suggestions from millert
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ami.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/amivar.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/ciss.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/cissvar.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/lm78.c | 22 | ||||
-rw-r--r-- | sys/dev/ic/lm78var.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/mfi.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/mfivar.h | 6 |
8 files changed, 32 insertions, 32 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index b28ff40d6b4..6650596dda8 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.176 2007/01/27 05:09:51 dlg Exp $ */ +/* $OpenBSD: ami.c,v 1.177 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -2442,11 +2442,11 @@ ami_create_sensors(struct ami_softc *sc) if (ssc == NULL) return (1); - sc->sc_sensors = malloc(sizeof(struct sensor) * sc->sc_nunits, + sc->sc_sensors = malloc(sizeof(struct ksensor) * sc->sc_nunits, M_DEVBUF, M_WAITOK); if (sc->sc_sensors == NULL) return (1); - bzero(sc->sc_sensors, sizeof(struct sensor) * sc->sc_nunits); + bzero(sc->sc_sensors, sizeof(struct ksensor) * sc->sc_nunits); strlcpy(sc->sc_sensordev.xname, DEVNAME(sc), sizeof(sc->sc_sensordev.xname)); diff --git a/sys/dev/ic/amivar.h b/sys/dev/ic/amivar.h index 5187bb50fe6..577bd0ba885 100644 --- a/sys/dev/ic/amivar.h +++ b/sys/dev/ic/amivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: amivar.h,v 1.51 2007/01/27 05:09:51 dlg Exp $ */ +/* $OpenBSD: amivar.h,v 1.52 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -141,8 +141,8 @@ struct ami_softc { } sc_hdr[AMI_BIG_MAX_LDRIVES]; struct ami_rawsoftc *sc_rawsoftcs; - struct sensor *sc_sensors; - struct sensordev sc_sensordev; + struct ksensor *sc_sensors; + struct ksensordev sc_sensordev; struct ami_big_diskarray *sc_bd; }; diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index 252499e4466..e1447c5136d 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.24 2007/01/18 14:46:24 mickey Exp $ */ +/* $OpenBSD: ciss.c,v 1.25 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -418,10 +418,10 @@ ciss_attach(struct ciss_softc *sc) sc->sc_dev.dv_xname); sc->sc_flags |= CISS_BIO; - sc->sensors = malloc(sizeof(struct sensor) * sc->maxunits, + sc->sensors = malloc(sizeof(struct ksensor) * sc->maxunits, M_DEVBUF, M_NOWAIT); if (sc->sensors) { - bzero(sc->sensors, sizeof(struct sensor) * sc->maxunits); + bzero(sc->sensors, sizeof(struct ksensor) * sc->maxunits); strlcpy(sc->sensordev.xname, sc->sc_dev.dv_xname, sizeof(sc->sensordev.xname)); for (i = 0; i < sc->maxunits; diff --git a/sys/dev/ic/cissvar.h b/sys/dev/ic/cissvar.h index c776adee065..2187c9afad0 100644 --- a/sys/dev/ic/cissvar.h +++ b/sys/dev/ic/cissvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cissvar.h,v 1.6 2006/12/23 17:46:39 deraadt Exp $ */ +/* $OpenBSD: cissvar.h,v 1.7 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -35,8 +35,8 @@ struct ciss_softc { void *sc_sh; struct proc *sc_thread; int sc_flush; - struct sensor *sensors; - struct sensordev sensordev; + struct ksensor *sensors; + struct ksensordev sensordev; u_int sc_flags; #define CISS_BIO 0x0001 diff --git a/sys/dev/ic/lm78.c b/sys/dev/ic/lm78.c index 7f670e7f6ec..b99a310f3cc 100644 --- a/sys/dev/ic/lm78.c +++ b/sys/dev/ic/lm78.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78.c,v 1.13 2007/02/22 20:44:51 kettenis Exp $ */ +/* $OpenBSD: lm78.c,v 1.14 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -575,7 +575,7 @@ lm_refresh_sensor_data(struct lm_softc *sc) void lm_refresh_volt(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int data; data = sc->lm_readreg(sc, sc->lm_sensors[n].reg); @@ -587,7 +587,7 @@ lm_refresh_volt(struct lm_softc *sc, int n) void lm_refresh_temp(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int sdata; /* @@ -609,7 +609,7 @@ lm_refresh_temp(struct lm_softc *sc, int n) void lm_refresh_fanrpm(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int data, divisor = 1; /* @@ -661,7 +661,7 @@ wb_refresh_sensor_data(struct lm_softc *sc) void wb_w83637hf_refresh_vcore(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int data; data = sc->lm_readreg(sc, sc->lm_sensors[n].reg); @@ -681,7 +681,7 @@ wb_w83637hf_refresh_vcore(struct lm_softc *sc, int n) void wb_refresh_nvolt(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int data; data = sc->lm_readreg(sc, sc->lm_sensors[n].reg); @@ -694,7 +694,7 @@ wb_refresh_nvolt(struct lm_softc *sc, int n) void wb_w83627ehf_refresh_nvolt(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int data; data = sc->lm_readreg(sc, sc->lm_sensors[n].reg); @@ -707,7 +707,7 @@ wb_w83627ehf_refresh_nvolt(struct lm_softc *sc, int n) void wb_refresh_temp(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int sdata; /* @@ -733,7 +733,7 @@ wb_refresh_temp(struct lm_softc *sc, int n) void wb_refresh_fanrpm(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int fan, data, divisor = 0; /* @@ -782,7 +782,7 @@ wb_refresh_fanrpm(struct lm_softc *sc, int n) void wb_w83792d_refresh_fanrpm(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int reg, shift, data, divisor = 1; switch (sc->lm_sensors[n].reg) { @@ -827,7 +827,7 @@ wb_w83792d_refresh_fanrpm(struct lm_softc *sc, int n) void as_refresh_temp(struct lm_softc *sc, int n) { - struct sensor *sensor = &sc->sensors[n]; + struct ksensor *sensor = &sc->sensors[n]; int sdata; /* diff --git a/sys/dev/ic/lm78var.h b/sys/dev/ic/lm78var.h index eff056f1154..3d526396ff6 100644 --- a/sys/dev/ic/lm78var.h +++ b/sys/dev/ic/lm78var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78var.h,v 1.10 2007/02/22 20:44:51 kettenis Exp $ */ +/* $OpenBSD: lm78var.h,v 1.11 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -137,8 +137,8 @@ struct lm_sensor { struct lm_softc { struct device sc_dev; - struct sensor sensors[WB_MAX_SENSORS]; - struct sensordev sensordev; + struct ksensor sensors[WB_MAX_SENSORS]; + struct ksensordev sensordev; struct lm_sensor *lm_sensors; u_int numsensors; void (*refresh_sensor_data) (struct lm_softc *); diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 16f149d0582..af9498e6202 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.70 2007/02/14 00:53:16 dlg Exp $ */ +/* $OpenBSD: mfi.c,v 1.71 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -1788,11 +1788,11 @@ mfi_create_sensors(struct mfi_softc *sc) if (ssc == NULL) return (1); - sc->sc_sensors = malloc(sizeof(struct sensor) * sc->sc_ld_cnt, + sc->sc_sensors = malloc(sizeof(struct ksensor) * sc->sc_ld_cnt, M_DEVBUF, M_WAITOK); if (sc->sc_sensors == NULL) return (1); - bzero(sc->sc_sensors, sizeof(struct sensor) * sc->sc_ld_cnt); + bzero(sc->sc_sensors, sizeof(struct ksensor) * sc->sc_ld_cnt); strlcpy(sc->sc_sensordev.xname, DEVNAME(sc), sizeof(sc->sc_sensordev.xname)); diff --git a/sys/dev/ic/mfivar.h b/sys/dev/ic/mfivar.h index f001f80f1f8..de88877a4fc 100644 --- a/sys/dev/ic/mfivar.h +++ b/sys/dev/ic/mfivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfivar.h,v 1.29 2006/12/23 17:46:39 deraadt Exp $ */ +/* $OpenBSD: mfivar.h,v 1.30 2007/03/22 16:55:31 deraadt Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -144,8 +144,8 @@ struct mfi_softc { struct mfi_ccb_list sc_ccb_freeq; - struct sensor *sc_sensors; - struct sensordev sc_sensordev; + struct ksensor *sc_sensors; + struct ksensordev sc_sensordev; }; int mfi_attach(struct mfi_softc *sc); |