Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Remove unused variables
details: https://anonhg.NetBSD.org/src/rev/bcb538052b2b
branches: trunk
changeset: 789905:bcb538052b2b
user: martin <martin%NetBSD.org@localhost>
date: Thu Sep 12 19:46:31 2013 +0000
description:
Remove unused variables
diffstat:
sys/dev/i2c/dbcool.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (70 lines):
diff -r 4ed738c6790e -r bcb538052b2b sys/dev/i2c/dbcool.c
--- a/sys/dev/i2c/dbcool.c Thu Sep 12 19:38:59 2013 +0000
+++ b/sys/dev/i2c/dbcool.c Thu Sep 12 19:46:31 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbcool.c,v 1.38 2012/06/02 21:36:44 dsl Exp $ */
+/* $NetBSD: dbcool.c,v 1.39 2013/09/12 19:46:31 martin Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.38 2012/06/02 21:36:44 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.39 2013/09/12 19:46:31 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -836,21 +836,20 @@
return true;
}
-/* On resume, we restore the previous state of the SHDN bit */
+/* On resume, we restore the previous state of the SHDN bit (which
+ we saved in sc_suspend) */
bool dbcool_pmf_resume(device_t dev, const pmf_qual_t *qual)
{
struct dbcool_softc *sc = device_private(dev);
- uint8_t reg, bit, cfg;
+ uint8_t reg, cfg;
if ((sc->sc_dc.dc_chip->flags & DBCFLAG_HAS_SHDN) == 0)
return true;
if (sc->sc_dc.dc_chip->flags & DBCFLAG_ADT7466) {
reg = DBCOOL_ADT7466_CONFIG2;
- bit = DBCOOL_ADT7466_CFG2_SHDN;
} else {
reg = DBCOOL_CONFIG2_REG;
- bit = DBCOOL_CFG2_SHDN;
}
cfg = sc->sc_dc.dc_readreg(&sc->sc_dc, reg);
cfg &= ~sc->sc_suspend;
@@ -1752,7 +1751,7 @@
static void
dbcool_setup_controllers(struct dbcool_softc *sc)
{
- int i, j, ret, rw_flag;
+ int i, j, rw_flag;
uint8_t sysctl_reg;
struct chip_id *chip = sc->sc_dc.dc_chip;
const struct sysctlnode *me2 = NULL;
@@ -1761,7 +1760,7 @@
for (i = 0; chip->power[i].desc != NULL; i++) {
snprintf(name, sizeof(name), "fan_ctl_%d", i);
- ret = sysctl_createv(&sc->sc_sysctl_log, 0, NULL, &me2,
+ sysctl_createv(&sc->sc_sysctl_log, 0, NULL, &me2,
CTLFLAG_READWRITE | CTLFLAG_OWNDESC,
CTLTYPE_NODE, name, NULL,
NULL, 0, NULL, 0,
@@ -1779,7 +1778,7 @@
rw_flag = CTLFLAG_READONLY | CTLFLAG_OWNDESC;
else
rw_flag = CTLFLAG_READWRITE | CTLFLAG_OWNDESC;
- ret = (sysctl_createv)(&sc->sc_sysctl_log, 0, NULL,
+ (sysctl_createv)(&sc->sc_sysctl_log, 0, NULL,
&node, rw_flag,
(j == DBC_PWM_BEHAVIOR)?
CTLTYPE_STRING:CTLTYPE_INT,
Home |
Main Index |
Thread Index |
Old Index