From: Tomi Valkeinen Date: Thu, 31 Jul 2014 13:15:39 +0000 (+0300) Subject: OMAPDSS: DSI: fix depopulating dsi peripherals X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4e42b8ad24cabf4d6d3c20a63f18dd6b954d9c2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git OMAPDSS: DSI: fix depopulating dsi peripherals After v3.16-rc1, devices populated with of_platform_populate() should be depopulated using of_platform_depopulate(). Failure to do so prevents the devices from being populated again (e.g. when loading a module). This patch fixes the problem for the OMAP DSI driver. Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c index 4755a34a5422..56b92444c54f 100644 --- a/drivers/video/fbdev/omap2/dss/dsi.c +++ b/drivers/video/fbdev/omap2/dss/dsi.c @@ -5658,18 +5658,11 @@ err_runtime_get: return r; } -static int dsi_unregister_child(struct device *dev, void *data) -{ - struct platform_device *pdev = to_platform_device(dev); - platform_device_unregister(pdev); - return 0; -} - static int __exit omap_dsihw_remove(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); - device_for_each_child(&dsidev->dev, NULL, dsi_unregister_child); + of_platform_depopulate(&dsidev->dev); WARN_ON(dsi->scp_clk_refcount > 0);