From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/5] resource: statically initialize iomem resource
Date: Sun, 7 Oct 2012 13:39:48 +0200 [thread overview]
Message-ID: <1349609991-26567-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1349609991-26567-1-git-send-email-s.hauer@pengutronix.de>
This gets us rid of an initcall and also has the advantage that
request_iomem_region can be called at any time now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/resource.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/common/resource.c b/common/resource.c
index da631d3..ea6abe8 100644
--- a/common/resource.c
+++ b/common/resource.c
@@ -101,6 +101,8 @@ int release_region(struct resource *res)
struct resource iomem_resource = {
.start = 0,
.end = 0xffffffff,
+ .name = "iomem",
+ .children = LIST_HEAD_INIT(iomem_resource.children),
};
/*
@@ -111,11 +113,3 @@ struct resource *request_iomem_region(const char *name,
{
return request_region(&iomem_resource, name, start, end);
}
-
-static int iomem_init(void)
-{
- init_resource(&iomem_resource, "iomem");
-
- return 0;
-}
-postcore_initcall(iomem_init);
--
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-10-07 11:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 11:39 [PATCH] misc improvements Sascha Hauer
2012-10-07 11:39 ` [PATCH 1/5] driver: print error message when probe fails Sascha Hauer
2012-10-07 11:39 ` Sascha Hauer [this message]
2012-10-07 11:39 ` [PATCH 3/5] console: Cleanup console activation Sascha Hauer
2012-10-07 11:39 ` [PATCH 4/5] console: cleanup Kconfig Sascha Hauer
2012-10-07 11:39 ` [PATCH 5/5] startup: Print error message when initcall fails Sascha Hauer
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=1349609991-26567-3-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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