SPI devices described in the device tree are not directly registered, but instead added to the SPI board_list which is normally used to register SPI devices from board code. This seems rather unnecessary, drop this detour and register SPI devices directly from spi_of_register_slaves(). Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index d6f939e51c..1444fe3741 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -138,7 +138,7 @@ static void spi_of_register_slaves(struct spi_controller *ctrl) continue; chip.chip_select = of_read_number(reg->value, 1); chip.device_node = n; - spi_register_board_info(&chip, 1); + spi_new_device(ctrl, &chip); } } -- 2.30.2