Commit c493fc4b authored by Jingoo Han's avatar Jingoo Han Committed by Mark Brown

spi: clps711x: 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 6221df6d
......@@ -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",
......@@ -261,8 +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);
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