[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <4b5d6615a1338145a461a6d4e1c7d3e42d4f4522.1369312303.git.michal.simek@xilinx.com>
Date: Thu, 23 May 2013 14:31:55 +0200
From: Michal Simek <michal.simek@...inx.com>
To: linux-kernel@...r.kernel.org
Cc: Michal Simek <monstr@...str.eu>,
Michal Simek <michal.simek@...inx.com>,
Graeme Smecher <gsmecher@...eespeedlogic.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Grant Likely <grant.likely@...retlab.ca>,
Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 1/2] xilinx systemace: Fix device name assignment for SystemACE (from "xs`" to "xsa").
From: Graeme Smecher <gsmecher@...eespeedlogic.com>
This fixes a bug introduced in 5d10302f46d, where device trees that don't
provide the "port-number" attribute are mistakenly assigned the device "xs`".
The error check that's supposed to assign a default letter can't succeed,
since it tests an unsigned type against a negative return code.
Signed-off-by: Graeme Smecher <gsmecher@...eespeedlogic.com>
Signed-off-by: Michal Simek <michal.simek@...inx.com>
Acked-by: Grant Likely <grant.likely@...retlab.ca>
---
drivers/block/xsysace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index f8ef15f..3fd130f 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1160,8 +1160,7 @@ static int ace_probe(struct platform_device *dev)
dev_dbg(&dev->dev, "ace_probe(%p)\n", dev);
/* device id and bus width */
- of_property_read_u32(dev->dev.of_node, "port-number", &id);
- if (id < 0)
+ if (of_property_read_u32(dev->dev.of_node, "port-number", &id))
id = 0;
if (of_find_property(dev->dev.of_node, "8-bit", NULL))
bus_width = ACE_BUS_WIDTH_8;
--
1.8.2.3
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists