Skip to content

Commit

Permalink
OMAPDSS: DSI: fix depopulating dsi peripherals
Browse files Browse the repository at this point in the history
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 <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed Aug 8, 2014
1 parent be92abe commit e4e42b8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/video/fbdev/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -5658,18 +5658,11 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
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);

Expand Down

0 comments on commit e4e42b8

Please sign in to comment.