未验证 提交 4332ea8f 编写于 作者: L Lukas Wunner 提交者: Mark Brown

spi: amd: Drop duplicate driver data assignments

The AMD SPI driver calls platform_set_drvdata() on probe even though
it's already been set by __spi_alloc_controller().  Likewise, it calls
platform_set_drvdata() on remove even though it's going to be set by
__device_release_driver().  Drop the duplicate assignments.
Signed-off-by: NLukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/499f8ad4759c2ff0f586e0459fb9a293faecff6d.1588590210.git.lukas@wunner.deSigned-off-by: NMark Brown <broonie@kernel.org>
上级 cc17fbec
......@@ -287,7 +287,6 @@ static int amd_spi_probe(struct platform_device *pdev)
dev_err(dev, "error %d registering SPI controller\n", err);
goto err_free_master;
}
platform_set_drvdata(pdev, amd_spi);
return 0;
......@@ -303,7 +302,6 @@ static int amd_spi_remove(struct platform_device *pdev)
spi_unregister_master(amd_spi->master);
spi_master_put(amd_spi->master);
platform_set_drvdata(pdev, NULL);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册