summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-pl022.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-24 08:44:59 +0400
committerMark Brown <broonie@linaro.org>2013-09-26 14:42:44 +0400
commit35794a77168b739bbc758b6c5b11c78572188d77 (patch)
tree3680c5123eeabf26d673c92d192ef5a24db770f2 /drivers/spi/spi-pl022.c
parent4bd3d8e36b5571db8874ea95ba2b95de1192e387 (diff)
downloadlinux-35794a77168b739bbc758b6c5b11c78572188d77.tar.xz
spi: pl022: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-pl022.c')
-rw-r--r--drivers/spi/spi-pl022.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index c13d523f1f48..5e3011094eb6 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2225,7 +2225,7 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
/* Register with the SPI framework */
amba_set_drvdata(adev, pl022);
- status = spi_register_master(master);
+ status = devm_spi_register_master(&adev->dev, master);
if (status != 0) {
dev_err(&adev->dev,
"probe - problem registering spi master\n");
@@ -2285,7 +2285,6 @@ pl022_remove(struct amba_device *adev)
clk_unprepare(pl022->clk);
amba_release_regions(adev);
tasklet_disable(&pl022->pump_transfers);
- spi_unregister_master(pl022->master);
return 0;
}