Files
linux-stable-mirror/drivers
Geert Uytterhoeven e5bd6aca70 spi: Fix double IDR allocation with DT aliases
commit 04b2d03a75 upstream.

If the SPI bus number is provided by a DT alias, idr_alloc() is called
twice, leading to:

    WARNING: CPU: 1 PID: 1 at drivers/spi/spi.c:2179 spi_register_controller+0x11c/0x5d8
    couldn't get idr

Fix this by moving the handling of fixed SPI bus numbers up, before the
DT handling code fills in ctlr->bus_num.

Fixes: 1a4327fbf4 ("spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Kirill Kapranov <kirill.kapranov@compulab.co.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-29 02:56:03 -07:00
..
…
2018-06-30 21:24:18 +09:00
…
…
…
…
…
…
2018-09-29 02:56:00 -07:00
…
…
…
2018-08-22 07:43:43 +02:00
…
2018-09-29 02:56:02 -07:00
…
2018-06-25 21:36:45 +08:00
…
…
…
2018-07-18 15:25:25 -07:00
2018-09-15 09:46:47 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…