summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-clps711x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-07 12:02:26 +0100
committerMark Brown <broonie@linaro.org>2013-10-07 12:02:26 +0100
commitdabefd56c6ee883bae0bdce4d5396c3f21286ab8 (patch)
tree2f629a4cfa71276b4afe947232f934f9b0887e7d /drivers/spi/spi-clps711x.c
parent3b3a80019ff194e86e740ec2f013a8915efd1ccf (diff)
parent2fe7e4add3e53df7c1b97e32076f8390dd81c6b3 (diff)
Merge remote-tracking branch 'spi/topic/devm' into spi-qspi
Conflicts: drivers/spi/spi-ti-qspi.c
Diffstat (limited to 'drivers/spi/spi-clps711x.c')
-rw-r--r--drivers/spi/spi-clps711x.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c
index 5655acf55bf..f2b1a1c3390 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",
@@ -247,7 +247,6 @@ err_out:
gpio_free(hw->chipselect[i]);
spi_master_put(master);
- kfree(master);
return ret;
}
@@ -262,9 +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);
- kfree(master);
-
return 0;
}