aboutsummaryrefslogtreecommitdiff
path: root/util/sconfig/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r--util/sconfig/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index eb996a7e9e..fe4c3b8e12 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -624,6 +624,14 @@ int main(int argc, char** argv) {
h = h->next;
fprintf(autogen, "#include \"%s/chip.h\"\n", h->name);
}
+ h = &headers;
+ while (h->next) {
+ h = h->next;
+ char *name_underscore = strdup(h->name);
+ translate_name(name_underscore, 0);
+ fprintf(autogen, "extern struct chip_operations %s_ops;\n", name_underscore);
+ free(name_underscore);
+ }
walk_device_tree(autogen, &root, inherit_subsystem_ids, NULL);
fprintf(autogen, "\n/* pass 0 */\n");