From fee73df07ac0d17f319486f977585c7945e0d069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 21 Aug 2012 11:37:11 +0300 Subject: Auto-declare chip_operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The name is derived directly from the device path. Change-Id: If2053d14f0e38a5ee0159b47a66d45ff3dff649a Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/1471 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Alexandru Gagniuc Reviewed-by: Anton Kochkov --- util/sconfig/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util') 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"); -- cgit v1.2.3