diff options
-rw-r--r-- | drivers/spi/spi-rspi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 58449ad4ad0d..b60862f58534 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c | |||
@@ -958,8 +958,9 @@ static int rspi_probe(struct platform_device *pdev) | |||
958 | INIT_WORK(&rspi->ws, rspi_work); | 958 | INIT_WORK(&rspi->ws, rspi_work); |
959 | init_waitqueue_head(&rspi->wait); | 959 | init_waitqueue_head(&rspi->wait); |
960 | 960 | ||
961 | master->num_chipselect = rspi_pd->num_chipselect; | 961 | if (rspi_pd && rspi_pd->num_chipselect) |
962 | if (!master->num_chipselect) | 962 | master->num_chipselect = rspi_pd->num_chipselect; |
963 | else | ||
963 | master->num_chipselect = 2; /* default */ | 964 | master->num_chipselect = 2; /* default */ |
964 | 965 | ||
965 | master->bus_num = pdev->id; | 966 | master->bus_num = pdev->id; |