From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/5] globalvar: add it's own bus
Date: Mon, 24 Sep 2012 17:40:24 +0200 [thread overview]
Message-ID: <1348501228-23083-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20120924152731.GF26553@game.jcrosoft.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-09-24 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 15:27 [RFC PATCH 0/5] switch globalvar to " Jean-Christophe PLAGNIOL-VILLARD
2012-09-24 15:40 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-09-24 15:40 ` [PATCH 2/5] globalvar: allow to register multiple device Jean-Christophe PLAGNIOL-VILLARD
2012-09-24 15:40 ` [PATCH 3/5] net: switch to global device Jean-Christophe PLAGNIOL-VILLARD
2012-09-24 15:40 ` [PATCH 4/5] dhcp: switch globalvar to it's own device Jean-Christophe PLAGNIOL-VILLARD
2012-09-24 15:40 ` [PATCH 5/5] bootm: " Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348501228-23083-1-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox