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

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

spi: pxa2xx: 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 35794a77
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1196,7 +1196,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)

	/* Register with the SPI framework */
	platform_set_drvdata(pdev, drv_data);
	status = spi_register_master(master);
	status = devm_spi_register_master(&pdev->dev, master);
	if (status != 0) {
		dev_err(&pdev->dev, "problem registering spi master\n");
		goto out_error_clock_enabled;
@@ -1248,9 +1248,6 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
	/* Release SSP */
	pxa_ssp_free(ssp);

	/* Disconnect from the SPI framework */
	spi_unregister_master(drv_data->master);

	return 0;
}