aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorThomas Petazzoni <[email protected]>2014-07-27 23:53:19 +0200
committerMark Brown <[email protected]>2014-07-28 22:30:43 +0100
commite06871cd2c92e5c65d7ca1d32866b4ca5dd4ac30 (patch)
treef29742cee9356fa0883df89eba0473207832bb62 /net/lapb/lapb_subr.c
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
spi: orion: fix incorrect handling of cell-index DT property
In commit f814f9ac5a81 ("spi/orion: add device tree binding"), Device Tree support was added to the spi-orion driver. However, this commit reads the "cell-index" property, without taking into account the fact that DT properties are big-endian encoded. Since most of the platforms using spi-orion with DT have apparently not used anything but cell-index = <0>, the problem was not visible. But as soon as one starts using cell-index = <1>, the problem becomes clearly visible, as the master->bus_num gets a wrong value (actually it gets the value 0, which conflicts with the first bus that has cell-index = <0>). This commit fixes that by using of_property_read_u32() to read the property value, which does the appropriate endianness conversion when needed. Fixes: f814f9ac5a81 ("spi/orion: add device tree binding") Signed-off-by: Thomas Petazzoni <[email protected]> Acked-by: Sebastian Hesselbarth <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: <[email protected]> # v3.6+
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions