diff options
author | Jingoo Han | 2013-09-24 13:34:24 +0900 |
---|---|---|
committer | Mark Brown | 2013-09-26 11:42:34 +0100 |
commit | 22ad2d8df77d1e88996d0e8f1c04db65f235a778 (patch) | |
tree | 1c7c8c18e6e84033bccfcf1daf776d37ed32afc5 /drivers/spi | |
parent | 33e195acf2682627d9f4d9fb9c30a5dd5323bc5c (diff) |
spi: octeon: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-octeon.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-octeon.c b/drivers/spi/spi-octeon.c index 5f28ddbe4f7e..67249a48b391 100644 --- a/drivers/spi/spi-octeon.c +++ b/drivers/spi/spi-octeon.c @@ -272,7 +272,7 @@ static int octeon_spi_probe(struct platform_device *pdev) master->bits_per_word_mask = SPI_BPW_MASK(8); master->dev.of_node = pdev->dev.of_node; - err = spi_register_master(master); + err = devm_spi_register_master(&pdev->dev, master); if (err) { dev_err(&pdev->dev, "register master failed: %d\n", err); goto fail; @@ -292,8 +292,6 @@ static int octeon_spi_remove(struct platform_device *pdev) struct octeon_spi *p = spi_master_get_devdata(master); u64 register_base = p->register_base; - spi_unregister_master(master); - /* Clear the CSENA* and put everything in a known state. */ cvmx_write_csr(register_base + OCTEON_SPI_CFG, 0); |