diff options
author | Gernot Vormayr <[email protected]> | 2013-05-24 15:55:03 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-05-24 16:22:50 -0700 |
commit | 585dc0c2f68981c02a0bb6fc8fe191a3f513959c (patch) | |
tree | 666f0d81139ab251365a7a0a171c50e333407d04 | |
parent | 17fdfd0851617b6c18c0913364caf2a54171ce85 (diff) |
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 <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Rob Herring <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | 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 f8ef15f37c5e..3fd130fdfbc1 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; |