aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgenii Ivanov <devivanov@proton.me>2025-08-12 04:17:13 +0000
committerAhmad Khalifa <vexeduxr@FreeBSD.org>2025-08-13 11:15:46 +0000
commit28bac28d90740b2bd48e532ad7500d2f46210413 (patch)
treec4c9a02a91ee22e3f7d870aea4b2f76685942d91
parent0e5e956bb393ad3665b552763db56f4a18893fbe (diff)
-rw-r--r--sys/dev/iicbus/gpio/pcf8574.c4
-rw-r--r--sys/dev/iicbus/gpio/tca64xx.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/iicbus/gpio/pcf8574.c b/sys/dev/iicbus/gpio/pcf8574.c
index 86c78ffb15e6..bf60dec67557 100644
--- a/sys/dev/iicbus/gpio/pcf8574.c
+++ b/sys/dev/iicbus/gpio/pcf8574.c
@@ -159,9 +159,7 @@ pcf8574_detach(device_t dev)
sc = device_get_softc(dev);
- if (sc->busdev != NULL)
- gpiobus_detach_bus(sc->busdev);
-
+ gpiobus_detach_bus(dev);
sx_destroy(&sc->lock);
return (0);
}
diff --git a/sys/dev/iicbus/gpio/tca64xx.c b/sys/dev/iicbus/gpio/tca64xx.c
index a973ef22f3fa..ab8fedd3f8fd 100644
--- a/sys/dev/iicbus/gpio/tca64xx.c
+++ b/sys/dev/iicbus/gpio/tca64xx.c
@@ -292,9 +292,7 @@ tca64xx_detach(device_t dev)
sc = device_get_softc(dev);
- if (sc->busdev != NULL)
- gpiobus_detach_bus(sc->busdev);
-
+ gpiobus_detach_bus(dev);
mtx_destroy(&sc->mtx);
return (0);