mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] stm8815: fix the uart device clock match
Date: Mon, 30 Aug 2010 06:05:06 +0200	[thread overview]
Message-ID: <1283141106-21671-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1283141106-21671-1-git-send-email-plagnioj@jcrosoft.com>

that use the device name + id to found it's clock
to use the right match as we fix the dev_name macro

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-nomadik/8815.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-nomadik/8815.c b/arch/arm/mach-nomadik/8815.c
index 8598f14..f1d5e8c 100644
--- a/arch/arm/mach-nomadik/8815.c
+++ b/arch/arm/mach-nomadik/8815.c
@@ -50,12 +50,14 @@ void st8815_add_device_sdram(u32 size)
 }
 
 static struct device_d uart0_serial_device = {
+	id = 0,
 	.name = "uart-pl011",
 	.map_base = NOMADIK_UART0_BASE,
 	.size = 4096,
 };
 
 static struct device_d uart1_serial_device = {
+	id = 1,
 	.name = "uart-pl011",
 	.map_base = NOMADIK_UART1_BASE,
 	.size = 4096,
@@ -65,12 +67,12 @@ void st8815_register_uart(unsigned id)
 {
 	switch (id) {
 	case 0:
-		nmdk_clk_create(&st8815_clk_48, uart0_serial_device.name);
 		register_device(&uart0_serial_device);
+		nmdk_clk_create(&st8815_clk_48, dev_name(uart0_serial_device));
 		break;
 	case 1:
-		nmdk_clk_create(&st8815_clk_48, uart1_serial_device.name);
 		register_device(&uart1_serial_device);
+		nmdk_clk_create(&st8815_clk_48, dev_name(uart0_serial_device));
 		break;
 	}
 }
-- 
1.7.1


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

  reply	other threads:[~2010-08-30  4:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30  4:05 [PATCH 1/2] device: fix dev_name Jean-Christophe PLAGNIOL-VILLARD
2010-08-30  4:05 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-08-30  7:36   ` [PATCH 2/2] stm8815: fix the uart device clock match Marc Kleine-Budde
2010-08-30  7:37     ` Jean-Christophe PLAGNIOL-VILLARD
2010-08-30  7:40   ` [PATCH 2/2 v2] " 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=1283141106-21671-2-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