提交 35794a77 编写于 作者: J Jingoo Han 提交者: Mark Brown

spi: pl022: use devm_spi_register_master()

Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册