mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 01:11:51 -04:00
mailbox: imx: use devm_of_platform_populate()
The driver uses of_platform_populate() but does not remove the added devices on removal. This can lead to "double devices" on module removal followed by adding the module again. Use devm_of_platform_populate() to remove the populated devices once the parent device is removed. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
This commit is contained in:
committed by
Jassi Brar
parent
1f602619e4
commit
dd1b321e80
@@ -984,7 +984,7 @@ static int imx_mu_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
||||
of_platform_populate(dev->of_node, NULL, NULL, dev);
|
||||
devm_of_platform_populate(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user