diff options
Diffstat (limited to 'usr/src/uts/intel')
-rw-r--r-- | usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c | 21 | ||||
-rw-r--r-- | usr/src/uts/intel/io/amdnbtemp/amdnbtemp.c | 10 | ||||
-rw-r--r-- | usr/src/uts/intel/io/coretemp/coretemp.c | 12 | ||||
-rw-r--r-- | usr/src/uts/intel/io/pchtemp/pchtemp.c | 10 | ||||
-rw-r--r-- | usr/src/uts/intel/tem/Makefile | 18 |
5 files changed, 27 insertions, 44 deletions
diff --git a/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c b/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c index 6b7da6a99a..7be8a4a9f8 100644 --- a/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c +++ b/usr/src/uts/intel/io/amdf17nbdf/amdf17nbdf.c @@ -684,13 +684,14 @@ amdf17nbdf_ioctl_kind(intptr_t arg, int mode) } static int -amdf17nbdf_ioctl_temp(amdf17nbdf_t *nbdf, minor_t minor, intptr_t arg, int mode) +amdf17nbdf_ioctl_scalar(amdf17nbdf_t *nbdf, minor_t minor, intptr_t arg, + int mode) { amdf17nb_t *nb; hrtime_t diff; - sensor_ioctl_temperature_t temp; + sensor_ioctl_scalar_t scalar; - bzero(&temp, sizeof (temp)); + bzero(&scalar, sizeof (scalar)); mutex_enter(&nbdf->amd_nbdf_lock); nb = amdf17nbdf_lookup_nb(nbdf, minor); @@ -710,12 +711,12 @@ amdf17nbdf_ioctl_temp(amdf17nbdf_t *nbdf, minor_t minor, intptr_t arg, int mode) } } - temp.sit_unit = SENSOR_UNIT_CELSIUS; - temp.sit_temp = nb->amd_nb_temp; - temp.sit_gran = AMDF17_THERMAL_GRANULARITY; + scalar.sis_unit = SENSOR_UNIT_CELSIUS; + scalar.sis_value = nb->amd_nb_temp; + scalar.sis_gran = AMDF17_THERMAL_GRANULARITY; mutex_exit(&nbdf->amd_nbdf_lock); - if (ddi_copyout(&temp, (void *)arg, sizeof (temp), + if (ddi_copyout(&scalar, (void *)arg, sizeof (scalar), mode & FKIOCTL) != 0) { return (EFAULT); } @@ -737,10 +738,10 @@ amdf17nbdf_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, m = getminor(dev); switch (cmd) { - case SENSOR_IOCTL_TYPE: + case SENSOR_IOCTL_KIND: return (amdf17nbdf_ioctl_kind(arg, mode)); - case SENSOR_IOCTL_TEMPERATURE: - return (amdf17nbdf_ioctl_temp(nbdf, m, arg, mode)); + case SENSOR_IOCTL_SCALAR: + return (amdf17nbdf_ioctl_scalar(nbdf, m, arg, mode)); default: return (ENOTTY); } diff --git a/usr/src/uts/intel/io/amdnbtemp/amdnbtemp.c b/usr/src/uts/intel/io/amdnbtemp/amdnbtemp.c index 1330f8563f..17934520fd 100644 --- a/usr/src/uts/intel/io/amdnbtemp/amdnbtemp.c +++ b/usr/src/uts/intel/io/amdnbtemp/amdnbtemp.c @@ -103,7 +103,7 @@ typedef struct amdnbtemp { static void *amdnbtemp_state; static int -amdnbtemp_read(void *arg, sensor_ioctl_temperature_t *temp) +amdnbtemp_read(void *arg, sensor_ioctl_scalar_t *scalar) { amdnbtemp_t *at = arg; @@ -120,9 +120,9 @@ amdnbtemp_read(void *arg, sensor_ioctl_temperature_t *temp) at->at_temp -= AMDNBTEMP_TEMP_ADJUST; } - temp->sit_unit = SENSOR_UNIT_CELSIUS; - temp->sit_gran = AMDNBTEMP_GRANULARITY; - temp->sit_temp = at->at_temp; + scalar->sis_unit = SENSOR_UNIT_CELSIUS; + scalar->sis_gran = AMDNBTEMP_GRANULARITY; + scalar->sis_value = at->at_temp; mutex_exit(&at->at_mutex); return (0); @@ -130,7 +130,7 @@ amdnbtemp_read(void *arg, sensor_ioctl_temperature_t *temp) static const ksensor_ops_t amdnbtemp_temp_ops = { .kso_kind = ksensor_kind_temperature, - .kso_temp = amdnbtemp_read + .kso_scalar = amdnbtemp_read }; static void diff --git a/usr/src/uts/intel/io/coretemp/coretemp.c b/usr/src/uts/intel/io/coretemp/coretemp.c index ee2d143554..bea8078002 100644 --- a/usr/src/uts/intel/io/coretemp/coretemp.c +++ b/usr/src/uts/intel/io/coretemp/coretemp.c @@ -259,7 +259,7 @@ coretemp_update(coretemp_t *ct, coretemp_sensor_t *sensor, cmi_hdl_t hdl) } static int -coretemp_read(void *arg, sensor_ioctl_temperature_t *sit) +coretemp_read(void *arg, sensor_ioctl_scalar_t *scalar) { coretemp_sensor_t *sensor = arg; coretemp_t *ct = sensor->cs_coretemp; @@ -313,10 +313,10 @@ coretemp_read(void *arg, sensor_ioctl_temperature_t *sit) sensor->cs_temperature = sensor->cs_tjmax - reading; sensor->cs_resolution = resolution; - sit->sit_unit = SENSOR_UNIT_CELSIUS; - sit->sit_temp = sensor->cs_temperature; - sit->sit_gran = CORETEMP_GRANULARITY; - sit->sit_prec = sensor->cs_resolution; + scalar->sis_unit = SENSOR_UNIT_CELSIUS; + scalar->sis_value = sensor->cs_temperature; + scalar->sis_gran = CORETEMP_GRANULARITY; + scalar->sis_prec = sensor->cs_resolution; mutex_exit(&ct->coretemp_mutex); return (0); @@ -324,7 +324,7 @@ coretemp_read(void *arg, sensor_ioctl_temperature_t *sit) static const ksensor_ops_t coretemp_temp_ops = { .kso_kind = ksensor_kind_temperature, - .kso_temp = coretemp_read + .kso_scalar = coretemp_read }; static void diff --git a/usr/src/uts/intel/io/pchtemp/pchtemp.c b/usr/src/uts/intel/io/pchtemp/pchtemp.c index 4aeb098112..2cfd7ae806 100644 --- a/usr/src/uts/intel/io/pchtemp/pchtemp.c +++ b/usr/src/uts/intel/io/pchtemp/pchtemp.c @@ -137,7 +137,7 @@ pchtemp_read_check(pchtemp_t *pch) } static int -pchtemp_read(void *arg, sensor_ioctl_temperature_t *sit) +pchtemp_read(void *arg, sensor_ioctl_scalar_t *scalar) { uint16_t temp, ctt, tahv, talv; uint8_t tsel; @@ -175,9 +175,9 @@ pchtemp_read(void *arg, sensor_ioctl_temperature_t *sit) } pch->pcht_temp = (temp & PCHTEMP_REG_TEMP_TSR) - PCHTEMP_TEMP_OFFSET; - sit->sit_unit = SENSOR_UNIT_CELSIUS; - sit->sit_gran = PCHTEMP_TEMP_RESOLUTION; - sit->sit_temp = pch->pcht_temp; + scalar->sis_unit = SENSOR_UNIT_CELSIUS; + scalar->sis_gran = PCHTEMP_TEMP_RESOLUTION; + scalar->sis_value = pch->pcht_temp; mutex_exit(&pch->pcht_mutex); return (0); @@ -185,7 +185,7 @@ pchtemp_read(void *arg, sensor_ioctl_temperature_t *sit) static const ksensor_ops_t pchtemp_temp_ops = { .kso_kind = ksensor_kind_temperature, - .kso_temp = pchtemp_read + .kso_scalar = pchtemp_read }; static void diff --git a/usr/src/uts/intel/tem/Makefile b/usr/src/uts/intel/tem/Makefile index 9eca2e7d98..1165cf3264 100644 --- a/usr/src/uts/intel/tem/Makefile +++ b/usr/src/uts/intel/tem/Makefile @@ -38,7 +38,6 @@ UTSBASE = ../.. # MODULE = tem OBJECTS = $(TEM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(TEM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE) # @@ -50,22 +49,11 @@ include $(UTSBASE)/intel/Makefile.intel # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) LDFLAGS += -dy -Ndacf/consconfig_dacf # -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_STATIC_UNUSED - -CERRWARN += -_gcc=-Wno-unused-function -CERRWARN += $(CNOWARN_UNINIT) - -# # Default build targets. # .KEEP_STATE: @@ -78,12 +66,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # |