summaryrefslogtreecommitdiff
path: root/libmachdev
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-06-05 05:05:19 +0200
committerZheng Da <zhengda1936@gmail.com>2010-06-05 05:05:19 +0200
commit147b63b7be6671d3a7d9ee3a8b7b2f070aaf3481 (patch)
tree0aef9032a93397034b8c88d12ae839f95fe90346 /libmachdev
parent21bf6f025d94c2987dfe30a0b327b6dfab7a8bff (diff)
skip calling init if there is no init.
Diffstat (limited to 'libmachdev')
-rw-r--r--libmachdev/ds_routines.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index 65cefa3a..df9146a0 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_routines.c
@@ -430,7 +430,8 @@ void mach_device_init()
dev_class = ports_create_class (0, 0);
for (i = 0; i < NUM_EMULATION; i++) {
- emulation_list[i]->init();
+ if (emulation_list[i]->init)
+ emulation_list[i]->init();
}
}