Module Name: src Committed By: bsiegert Date: Tue Aug 21 14:09:41 UTC 2018
Modified Files: src/sys/arch/arm/sunxi: sunxi_thermal.c Log Message: Fix two typos in the Sunxi thermal driver. Noticed by rudolf in PR port-arm/53537. ok jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_thermal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/sunxi/sunxi_thermal.c diff -u src/sys/arch/arm/sunxi/sunxi_thermal.c:1.5 src/sys/arch/arm/sunxi/sunxi_thermal.c:1.6 --- src/sys/arch/arm/sunxi/sunxi_thermal.c:1.5 Sun Jan 28 18:24:50 2018 +++ src/sys/arch/arm/sunxi/sunxi_thermal.c Tue Aug 21 14:09:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_thermal.c,v 1.5 2018/01/28 18:24:50 jmcneill Exp $ */ +/* $NetBSD: sunxi_thermal.c,v 1.6 2018/08/21 14:09:41 bsiegert Exp $ */ /*- * Copyright (c) 2016-2017 Jared McNeill <jmcne...@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunxi_thermal.c,v 1.5 2018/01/28 18:24:50 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_thermal.c,v 1.6 2018/08/21 14:09:41 bsiegert Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -259,7 +259,7 @@ h5_to_temp(u_int sensor, uint32_t val) mul = H5_TEMP_MUL_L; } else { base = sensor == 0 ? H5_TEMP_BASE_H_0 : H5_TEMP_BASE_H_1; - mul = sensor == 0 ? H5_TEMP_MUL_H_1 : H5_TEMP_MUL_H_1; + mul = sensor == 0 ? H5_TEMP_MUL_H_0 : H5_TEMP_MUL_H_1; } return (base - val * mul) >> H5_TEMP_DIV; @@ -275,7 +275,7 @@ h5_to_reg(u_int sensor, int val) mul = H5_TEMP_MUL_L; } else { base = sensor == 0 ? H5_TEMP_BASE_H_0 : H5_TEMP_BASE_H_1; - mul = sensor == 0 ? H5_TEMP_MUL_H_1 : H5_TEMP_MUL_H_1; + mul = sensor == 0 ? H5_TEMP_MUL_H_0 : H5_TEMP_MUL_H_1; } return (base - (val << H5_TEMP_DIV)) / mul;