Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
Link platform device resources properly.
Browse files Browse the repository at this point in the history
The resources of the platform devices created by the OF core were
not properly linked. Make sure that they are, so that we don't get
any crashes when trying to remove the device.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
  • Loading branch information
pantoniou authored and Robert Pohlink committed Sep 27, 2016
1 parent 7486430 commit 9111f04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/of/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ int of_device_add(struct platform_device *ofdev)
if (!ofdev->dev.parent)
set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node));

/* make sure we add the resources to the appropriate lists */
platform_device_link_resources(ofdev);

return device_add(&ofdev->dev);
}

Expand Down

0 comments on commit 9111f04

Please sign in to comment.