Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f12f7318 authored by Jingoo Han's avatar Jingoo Han Committed by Mark Brown
Browse files

spi: tegra20-sflash: 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>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 5c809643
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -529,7 +529,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)
	pm_runtime_put(&pdev->dev);

	master->dev.of_node = pdev->dev.of_node;
	ret = spi_register_master(master);
	ret = devm_spi_register_master(&pdev->dev, master);
	if (ret < 0) {
		dev_err(&pdev->dev, "can not register to master err %d\n", ret);
		goto exit_pm_disable;
@@ -553,7 +553,6 @@ static int tegra_sflash_remove(struct platform_device *pdev)
	struct tegra_sflash_data	*tsd = spi_master_get_devdata(master);

	free_irq(tsd->irq, tsd);
	spi_unregister_master(master);

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))