Skip to content

Commit 585dc0c

Browse files
nottitorvalds
authored andcommitted
drivers/block/xsysace.c: fix id with missing port-number
If the port number is missing from the device-tree the device gets named xs` instead of xsa. This fixes the check for missing ids. Tested on ml507 board. Signed-off-by: Gernot Vormayr <gvormayr@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 17fdfd0 commit 585dc0c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/block/xsysace.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,8 +1160,7 @@ static int ace_probe(struct platform_device *dev)
11601160
dev_dbg(&dev->dev, "ace_probe(%p)\n", dev);
11611161

11621162
/* device id and bus width */
1163-
of_property_read_u32(dev->dev.of_node, "port-number", &id);
1164-
if (id < 0)
1163+
if (of_property_read_u32(dev->dev.of_node, "port-number", &id))
11651164
id = 0;
11661165
if (of_find_property(dev->dev.of_node, "8-bit", NULL))
11671166
bus_width = ACE_BUS_WIDTH_8;

0 commit comments

Comments
 (0)