Signed-off-by: Alexander Shiyan <eagle.alexander923@xxxxxxxxx> --- drivers/spi/atmel_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 62e1c66fd2..f441bfdfe1 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -402,7 +402,7 @@ static int atmel_spi_probe(struct device *dev) master = &as->master; master->dev = dev; - master->bus_num = dev->id; + master->bus_num = pdata ? dev->id : -1; if (pdata) { master->num_chipselect = pdata->num_chipselect; -- 2.39.1