summaryrefslogtreecommitdiff
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-01-12 12:50:11 +0000
committerLee Jones <lee.jones@linaro.org>2012-01-12 12:50:11 +0000
commit72108d578689febd3579bf16be470328ded6c6d9 (patch)
treecc36ad5306ce823f8e98956c8f048f48017be3cc /drivers/of/platform.c
parent330f78a83c1f47055427e10a68733af77b2cbac8 (diff)
parent2150f72fe35397cc6d6ce39866bd0462cfbcc916 (diff)
Automatically merging tracking-igloo_kernel-other into merging-stable-linaro-ux500-3.1stable-linaro-ux500-3.1
Conflicting files:
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r--drivers/of/platform.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ed5a6d3c26a..b22f8873a41 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -345,6 +345,7 @@ static int of_platform_bus_create(struct device_node *bus,
struct platform_device *dev;
const char *bus_id = NULL;
void *platform_data = NULL;
+ int id = -1;
int rc = 0;
/* Make sure it has a compatible property */
@@ -357,6 +358,7 @@ static int of_platform_bus_create(struct device_node *bus,
auxdata = of_dev_lookup(lookup, bus);
if (auxdata) {
bus_id = auxdata->name;
+ id = auxdata->id;
platform_data = auxdata->platform_data;
}
@@ -366,6 +368,11 @@ static int of_platform_bus_create(struct device_node *bus,
}
dev = of_platform_device_create_pdata(bus, bus_id, platform_data, parent);
+
+ /* override the id if auxdata gives an id */
+ if (id != -1)
+ dev->id = id;
+
if (!dev || !of_match_node(matches, bus))
return 0;