[PATCH 1/5] globalvar: add it's own bus
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Sep 24 11:40:24 EDT 2012
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
common/globalvar.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/common/globalvar.c b/common/globalvar.c
index a8aaa72..6bf2332 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -66,8 +66,21 @@ int globalvar_add_simple(const char *name)
return globalvar_add(name, NULL, NULL, 0);
}
+static int global_match(struct device_d *dev, struct driver_d *drv)
+{
+ return 1;
+}
+
+static struct bus_type global_bus = {
+ .name = "global",
+ .match = global_match,
+ .probe = dummy_probe,
+};
+
static int globalvar_init(void)
{
+ bus_register(&global_bus);
+ global_device.bus = &global_bus;
register_device(&global_device);
return 0;
--
1.7.10.4
More information about the barebox
mailing list