devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/6] ARM: integrator: check PL010 device name rather than base address
@ 2012-08-16 12:15 Linus Walleij
  0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2012-08-16 12:15 UTC (permalink / raw)
  To: linux-arm-kernel, devicetree-discuss
  Cc: Will Deacon, Linus Walleij, arm, Russell King

In the PL010 UART callback a comparison against the base address is
done to figure out which UART is doing the callback. This does not
play well with device tree, so let's check the dev_name() of the
device instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-integrator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 5ba4bc8..67ea181 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -100,7 +100,7 @@ static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *bas
 {
 	unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask;
 
-	if (dev == &uart0_device) {
+	if (!strcmp(dev_name(&dev->dev), "uart0")) {
 		rts_mask = 1 << 4;
 		dtr_mask = 1 << 5;
 	} else {
-- 
1.7.11.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-16 12:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16 12:15 [PATCH 2/6] ARM: integrator: check PL010 device name rather than base address Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).