block: Fix id of xsysace with missing port-number
PATCH 1/1 block: Fix id of xsysace with missing port-number
Since id is u32 the comparsion < 0 will fail. The right way would be to check the return value of of_property_read_u32
Tested on ml507 board.
Signed-off-by Gernot Vormayr <[email protected]>
--- drivers/block/xsysace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/xsysace.c +1 -2
@@ -1162,8 +1162,7 @@ static int __devinit 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 ;
Signature · 1 line
1.7.9.5