Search
SailfishOS Open Build Service
>
Projects
>
home:mike7b4
:
bbb
>
kernel-adaptation-bbb-v3.12
> 0033-of-Link-platform-device-resources-properly.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0033-of-Link-platform-device-resources-properly.patch of Package kernel-adaptation-bbb-v3.12
From 709dd0523824356cd63a0716a0c9a6a4c2261991 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou <panto@antoniou-consulting.com> Date: Fri, 28 Dec 2012 11:39:29 +0200 Subject: [PATCH 33/96] of: Link platform device resources properly. 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. This commit is based on the previous commit of "pdev: Fix platform device resource linking" Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> --- drivers/of/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/device.c b/drivers/of/device.c index f685e55..b4b95c6 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -63,6 +63,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); } -- 1.9.1