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

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

spi: remove unnecessary platform_set_drvdata()



The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d063
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f722406f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -285,7 +285,6 @@ static int altera_spi_probe(struct platform_device *pdev)
exit_busy:
	err = -EBUSY;
exit:
	platform_set_drvdata(pdev, NULL);
	spi_master_put(master);
	return err;
}
@@ -296,7 +295,6 @@ static int altera_spi_remove(struct platform_device *dev)
	struct spi_master *master = hw->bitbang.master;

	spi_bitbang_stop(&hw->bitbang);
	platform_set_drvdata(dev, NULL);
	spi_master_put(master);
	return 0;
}
+0 −2
Original line number Diff line number Diff line
@@ -287,7 +287,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
err_unmap:
	iounmap(sp->base);
err_put_master:
	platform_set_drvdata(pdev, NULL);
	spi_master_put(sp->bitbang.master);

	return ret;
@@ -302,7 +301,6 @@ static int ath79_spi_remove(struct platform_device *pdev)
	clk_disable(sp->clk);
	clk_put(sp->clk);
	iounmap(sp->base);
	platform_set_drvdata(pdev, NULL);
	spi_master_put(sp->bitbang.master);

	return 0;
+0 −2
Original line number Diff line number Diff line
@@ -987,8 +987,6 @@ static int au1550_spi_remove(struct platform_device *pdev)
		au1xxx_dbdma_chan_free(hw->dma_tx_ch);
	}

	platform_set_drvdata(pdev, NULL);

	spi_master_put(hw->master);
	return 0;
}
+0 −3
Original line number Diff line number Diff line
@@ -469,7 +469,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
out_clk_disable:
	clk_disable_unprepare(clk);
out_err:
	platform_set_drvdata(pdev, NULL);
	spi_master_put(master);
out_clk:
	clk_put(clk);
@@ -491,8 +490,6 @@ static int bcm63xx_spi_remove(struct platform_device *pdev)
	clk_disable_unprepare(bs->clk);
	clk_put(bs->clk);

	platform_set_drvdata(pdev, 0);

	spi_master_put(master);

	return 0;
+0 −3
Original line number Diff line number Diff line
@@ -882,9 +882,6 @@ static int bfin_sport_spi_remove(struct platform_device *pdev)

	peripheral_free_list(drv_data->pin_req);

	/* Prevent double remove */
	platform_set_drvdata(pdev, NULL);

	return 0;
}

Loading