mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/6] state: use name of device node as name, if alias is not available
Date: Mon, 19 Oct 2015 12:23:35 +0200	[thread overview]
Message-ID: <1445250220-28239-2-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1445250220-28239-1-git-send-email-mkl@pengutronix.de>

Wihtout this patch, when using more than one state device an alias is
mandatory, otherwise the there will be two state devices with the name state.

This patch fixes the limitation by using the device node's name if no alias is
defined.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/misc/state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/state.c b/drivers/misc/state.c
index f3e366480fa2..7a3303264206 100644
--- a/drivers/misc/state.c
+++ b/drivers/misc/state.c
@@ -37,7 +37,7 @@ static int state_probe(struct device_d *dev)
 
 	alias = of_alias_get(np);
 	if (!alias)
-		alias = "state";
+		alias = np->name;
 
 	state = state_new_from_node(alias, np);
 	if (IS_ERR(state))
-- 
2.6.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-10-19 10:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 10:23 [PATCH 0/6] state Marc Kleine-Budde
2015-10-19 10:23 ` Marc Kleine-Budde [this message]
2015-10-19 10:23 ` [PATCH 2/6] state: return -EPROBE_DEFER if the backend isn't available Marc Kleine-Budde
2015-10-19 10:23 ` [PATCH 3/6] state: disable load command Marc Kleine-Budde
2015-10-19 10:23 ` [PATCH 4/6] crypto: add simple keystore Marc Kleine-Budde
2015-10-19 10:23 ` [PATCH 5/6] state: prepare raw backend for hmac support Marc Kleine-Budde
2015-10-19 10:23 ` [PATCH 6/6] state: backend_raw: add hamc support Marc Kleine-Budde

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=1445250220-28239-2-git-send-email-mkl@pengutronix.de \
    --to=mkl@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