summaryrefslogtreecommitdiff
path: root/src/devices/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/chip.c')
-rw-r--r--src/devices/chip.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/devices/chip.c b/src/devices/chip.c
index d25c92e0d7..e99d731043 100644
--- a/src/devices/chip.c
+++ b/src/devices/chip.c
@@ -10,6 +10,15 @@
void
chip_configure(struct chip *root, enum chip_pass pass)
{
- while (root) {
+ struct chip *c;
+
+ for (c = root; c; c = c->next) {
+ if (root->control && root->control->enable)
+ root->control->enable(root, pass);
+ }
+
+ for (c = root; c; c = c->next) {
+ if (root->children)
+ chip_configure(root->children, pass);
}
}