mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
spi: spi_bfin5xx: fix probe() sequencing
Fix bug in SPI probe: first initialize peripheral pins, and just after register spi master device. This fixes problems with SPI drivers built-in kernel. Singed-off-by: Vitja Makarov <vitja.makarov@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4fb98efacf
commit
f9e522caec
1 changed files with 6 additions and 6 deletions
|
@ -1294,6 +1294,12 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
|
|||
goto out_error_queue_alloc;
|
||||
}
|
||||
|
||||
status = peripheral_request_list(drv_data->pin_req, DRV_NAME);
|
||||
if (status != 0) {
|
||||
dev_err(&pdev->dev, ": Requesting Peripherals failed\n");
|
||||
goto out_error_queue_alloc;
|
||||
}
|
||||
|
||||
/* Register with the SPI framework */
|
||||
platform_set_drvdata(pdev, drv_data);
|
||||
status = spi_register_master(master);
|
||||
|
@ -1302,12 +1308,6 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
|
|||
goto out_error_queue_alloc;
|
||||
}
|
||||
|
||||
status = peripheral_request_list(drv_data->pin_req, DRV_NAME);
|
||||
if (status != 0) {
|
||||
dev_err(&pdev->dev, ": Requesting Peripherals failed\n");
|
||||
goto out_error;
|
||||
}
|
||||
|
||||
dev_info(dev, "%s, Version %s, regs_base@%p, dma channel@%d\n",
|
||||
DRV_DESC, DRV_VERSION, drv_data->regs_base,
|
||||
drv_data->dma_channel);
|
||||
|
|
Loading…
Reference in a new issue