diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-24 08:27:48 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 14:42:31 +0400 |
commit | c493fc4bbd4f27b1a8a141648df866c386441b70 (patch) | |
tree | a0dd2a990acb487a30829072e7e892de8ffa23b1 /drivers/spi/spi-clps711x.c | |
parent | 6221df6d88b847da0803b2ced7826f005e62c837 (diff) | |
download | linux-c493fc4bbd4f27b1a8a141648df866c386441b70.tar.xz |
spi: clps711x: 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/spi-clps711x.c')
-rw-r--r-- | drivers/spi/spi-clps711x.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c index b597a92565dc..f2b1a1c33907 100644 --- a/drivers/spi/spi-clps711x.c +++ b/drivers/spi/spi-clps711x.c @@ -230,7 +230,7 @@ static int spi_clps711x_probe(struct platform_device *pdev) goto clk_out; } - ret = spi_register_master(master); + ret = devm_spi_register_master(&pdev->dev, master); if (!ret) { dev_info(&pdev->dev, "SPI bus driver initialized. Master clock %u Hz\n", @@ -261,8 +261,6 @@ static int spi_clps711x_remove(struct platform_device *pdev) if (gpio_is_valid(hw->chipselect[i])) gpio_free(hw->chipselect[i]); - spi_unregister_master(master); - return 0; } |