diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2019-06-19 14:38:28 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-20 13:08:48 +0100 |
commit | f9481b08220d7dc1ff21e296a330ee8b721b44e4 (patch) | |
tree | dfb1557289c56d13b81665eef3390858196b4869 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | 51c711f2c38a412aaeda43c8167fe41877cf414d (diff) |
spi: fix ctrl->num_chipselect constraint
at91sam9g25ek showed the following error at probe:
atmel_spi f0000000.spi: Using dma0chan2 (tx) and dma0chan3 (rx)
for DMA transfers
atmel_spi: probe of f0000000.spi failed with error -22
Commit 0a919ae49223 ("spi: Don't call spi_get_gpio_descs() before device name is set")
moved the calling of spi_get_gpio_descs() after ctrl->dev is set,
but didn't move the !ctrl->num_chipselect check. When there are
chip selects in the device tree, the spi-atmel driver lets the
SPI core discover them when registering the SPI master.
The ctrl->num_chipselect is thus expected to be set by
spi_get_gpio_descs().
Move the !ctlr->num_chipselect after spi_get_gpio_descs() as it was
before the aforementioned commit. While touching this block, get rid
of the explicit comparison with 0 and update the commenting style.
Fixes: 0a919ae49223 ("spi: Don't call spi_get_gpio_descs() before device name is set")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions