All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: xsysace: Fix device name assignment for SystemACE (from "xs`" to "xsa").
@ 2013-02-07 14:30 Michal Simek
  0 siblings, 0 replies; only message in thread
From: Michal Simek @ 2013-02-07 14:30 UTC (permalink / raw)
  To: linux-kernel, monstr; +Cc: Alexey.Brodkin, grant.likely, Graeme Smecher

From: Graeme Smecher <gsmecher@threespeedlogic.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@threespeedlogic.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/block/xsysace.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 64fd3c0..9462e68 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1161,8 +1161,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.7.0.4


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

only message in thread, other threads:[~2013-02-07 14:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 14:30 [PATCH] block: xsysace: Fix device name assignment for SystemACE (from "xs`" to "xsa") Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.