summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/dwiic.c13
-rw-r--r--sys/dev/pci/dwiic_pci.c7
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ic/dwiic.c b/sys/dev/ic/dwiic.c
index cb2f986cc29..ba425226ab4 100644
--- a/sys/dev/ic/dwiic.c
+++ b/sys/dev/ic/dwiic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwiic.c,v 1.18 2024/08/17 02:14:20 deraadt Exp $ */
+/* $OpenBSD: dwiic.c,v 1.19 2024/08/17 02:24:03 deraadt Exp $ */
/*
* Synopsys DesignWare I2C controller
*
@@ -33,9 +33,11 @@ int
dwiic_activate(struct device *self, int act)
{
struct dwiic_softc *sc = (struct dwiic_softc *)self;
+ int rv;
switch (act) {
case DVACT_SUSPEND:
+ rv = config_activate_children(self, act);
/* disable controller */
dwiic_enable(sc, 0);
@@ -45,12 +47,13 @@ dwiic_activate(struct device *self, int act)
break;
case DVACT_RESUME:
dwiic_init(sc);
+ rv = config_activate_children(self, act);
+ break;
+ default:
+ rv = config_activate_children(self, act);
break;
}
-
- config_activate_children(self, act);
-
- return 0;
+ return rv;
}
int
diff --git a/sys/dev/pci/dwiic_pci.c b/sys/dev/pci/dwiic_pci.c
index 68f25f37d33..3d3548c0e74 100644
--- a/sys/dev/pci/dwiic_pci.c
+++ b/sys/dev/pci/dwiic_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwiic_pci.c,v 1.28 2024/08/17 02:14:21 deraadt Exp $ */
+/* $OpenBSD: dwiic_pci.c,v 1.29 2024/08/17 02:24:06 deraadt Exp $ */
/*
* Synopsys DesignWare I2C controller
* PCI attachment
@@ -298,10 +298,7 @@ dwiic_pci_activate(struct device *self, int act)
(LPSS_RESETS_I2C | LPSS_RESETS_IDMA));
break;
}
-
- dwiic_activate(self, act);
-
- return 0;
+ return dwiic_activate(self, act);
}
void