diff options
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 20dd71237d3b..8bed27a4108c 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -1428,9 +1428,9 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) | |||
1428 | S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN, | 1428 | S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN, |
1429 | sdd->regs + S3C64XX_SPI_INT_EN); | 1429 | sdd->regs + S3C64XX_SPI_INT_EN); |
1430 | 1430 | ||
1431 | if (spi_register_master(master)) { | 1431 | ret = devm_spi_register_master(&pdev->dev, master); |
1432 | dev_err(&pdev->dev, "cannot register SPI master\n"); | 1432 | if (ret != 0) { |
1433 | ret = -EBUSY; | 1433 | dev_err(&pdev->dev, "cannot register SPI master: %d\n", ret); |
1434 | goto err3; | 1434 | goto err3; |
1435 | } | 1435 | } |
1436 | 1436 | ||
@@ -1461,16 +1461,12 @@ static int s3c64xx_spi_remove(struct platform_device *pdev) | |||
1461 | 1461 | ||
1462 | pm_runtime_disable(&pdev->dev); | 1462 | pm_runtime_disable(&pdev->dev); |
1463 | 1463 | ||
1464 | spi_unregister_master(master); | ||
1465 | |||
1466 | writel(0, sdd->regs + S3C64XX_SPI_INT_EN); | 1464 | writel(0, sdd->regs + S3C64XX_SPI_INT_EN); |
1467 | 1465 | ||
1468 | clk_disable_unprepare(sdd->src_clk); | 1466 | clk_disable_unprepare(sdd->src_clk); |
1469 | 1467 | ||
1470 | clk_disable_unprepare(sdd->clk); | 1468 | clk_disable_unprepare(sdd->clk); |
1471 | 1469 | ||
1472 | spi_master_put(master); | ||
1473 | |||
1474 | return 0; | 1470 | return 0; |
1475 | } | 1471 | } |
1476 | 1472 | ||