Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
sys/ihidev: move debug log resettign to the right place
To:
Marcus Glocker <marcus@nazgul.ch>
Cc:
OpenBSD tech <tech@openbsd.org>
Date:
Mon, 13 Jan 2025 15:28:06 +0100

Download raw body.

Thread
Marcus,

as promised here a dedicated commit to move DPRINTF into proper place.

Ok?

Index: sys/dev/i2c/ihidev.c
===================================================================
RCS file: /home/cvs/src/sys/dev/i2c/ihidev.c,v
diff -u -p -r1.38 ihidev.c
--- sys/dev/i2c/ihidev.c	7 Jan 2025 23:13:56 -0000	1.38
+++ sys/dev/i2c/ihidev.c	13 Jan 2025 14:25:03 -0000
@@ -577,8 +577,6 @@ ihidev_hid_command(struct ihidev_softc *
 int
 ihidev_poweron(struct ihidev_softc *sc)
 {
-	DPRINTF(("%s: resetting\n", sc->sc_dev.dv_xname));
-
 	if (ihidev_hid_command(sc, I2C_HID_CMD_SET_POWER, &I2C_HID_POWER_ON)) {
 		printf("%s: failed to power on\n", sc->sc_dev.dv_xname);
 		return (1);
@@ -593,6 +591,8 @@ ihidev_poweron(struct ihidev_softc *sc)
 int
 ihidev_reset(struct ihidev_softc *sc)
 {
+	DPRINTF(("%s: resetting\n", sc->sc_dev.dv_xname));
+
 	if (ihidev_poweron(sc))
 		return (1);
 

-- 
wbr, Kirill