summaryrefslogtreecommitdiff
path: root/util/sconfig/main.c
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2012-10-07 22:04:52 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-27 21:48:22 +0100
commitb6f765e7c85539b270dba407ff40846c3688ed60 (patch)
tree2958a12a09307add1624e99aec9167423320167b /util/sconfig/main.c
parent28b900afbd6bcf817654f6cfab90bea8af43f5bd (diff)
downloadcoreboot-b6f765e7c85539b270dba407ff40846c3688ed60.tar.xz
Provide weak empty declarations of all chip_ops used on a board
sconfig creates empty defaults for all chip_ops, which can be overridden by drivers simply by providing a concrete implementation. Change-Id: Ib37515f0b0747bdbf4da780d28690a1e719944b2 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/1567 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r--util/sconfig/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 43b083e92b..f5e6ac137f 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -641,7 +641,7 @@ int main(int argc, char** argv) {
while (h->next) {
h = h->next;
char *name_underscore = translate_name(h->name, UNSLASH);
- fprintf(autogen, "extern struct chip_operations %s_ops;\n", name_underscore);
+ fprintf(autogen, "__attribute__((weak)) struct chip_operations %s_ops = {};\n", name_underscore);
free(name_underscore);
}
fprintf(autogen, "#endif\n");