Commit 35794a77 authored by Jingoo Han's avatar Jingoo Han Committed by Mark Brown

spi: pl022: use devm_spi_register_master()

Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 4bd3d8e3
...@@ -2225,7 +2225,7 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -2225,7 +2225,7 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
/* Register with the SPI framework */ /* Register with the SPI framework */
amba_set_drvdata(adev, pl022); amba_set_drvdata(adev, pl022);
status = spi_register_master(master); status = devm_spi_register_master(&adev->dev, master);
if (status != 0) { if (status != 0) {
dev_err(&adev->dev, dev_err(&adev->dev,
"probe - problem registering spi master\n"); "probe - problem registering spi master\n");
...@@ -2285,7 +2285,6 @@ pl022_remove(struct amba_device *adev) ...@@ -2285,7 +2285,6 @@ pl022_remove(struct amba_device *adev)
clk_unprepare(pl022->clk); clk_unprepare(pl022->clk);
amba_release_regions(adev); amba_release_regions(adev);
tasklet_disable(&pl022->pump_transfers); tasklet_disable(&pl022->pump_transfers);
spi_unregister_master(pl022->master);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment