summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/ietp.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2024-08-18 03:25:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2024-08-18 03:25:05 +0000
commitd68c7c060fc790f81a6028c2658d4581eda97b1a (patch)
tree0c410d0f82fc35d036ff5a51bddc0452d5be376e /sys/dev/i2c/ietp.c
parent78c8ab89d98a3c10131805b5e3afdb96121d1489 (diff)
add missing child activate handling, found due to idiom inspection
tested by phessler, input from kettenis
Diffstat (limited to 'sys/dev/i2c/ietp.c')
-rw-r--r--sys/dev/i2c/ietp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/i2c/ietp.c b/sys/dev/i2c/ietp.c
index 353eb9073d9..fac002babfa 100644
--- a/sys/dev/i2c/ietp.c
+++ b/sys/dev/i2c/ietp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ietp.c,v 1.2 2023/07/21 02:19:49 jcs Exp $ */
+/* $OpenBSD: ietp.c,v 1.3 2024/08/18 03:25:04 deraadt Exp $ */
/*
* Elan I2C Touchpad driver
*
@@ -304,11 +304,13 @@ int
ietp_activate(struct device *self, int act)
{
struct ietp_softc *sc = (struct ietp_softc *)self;
+ int rv;
DPRINTF(("%s(%d)\n", __func__, act));
switch (act) {
case DVACT_QUIESCE:
+ rv = config_activate_children(self, act);
sc->sc_dying = 1;
if (ietp_set_power(sc, I2C_HID_POWER_OFF))
printf("%s: failed to power down\n",
@@ -317,12 +319,13 @@ ietp_activate(struct device *self, int act)
case DVACT_WAKEUP:
ietp_reset(sc);
sc->sc_dying = 0;
+ rv = config_activate_children(self, act);
+ break;
+ default:
+ rv = config_activate_children(self, act);
break;
}
-
- config_activate_children(self, act);
-
- return 0;
+ return rv;
}
void