Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133458
b: refs/heads/master
c: ce21c7b
h: refs/heads/master
v: v3
  • Loading branch information
Ming Lei authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent 7e36173 commit 12f3486
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 006f4571a15fae3a0575f2a0f9e9b63b3d1012f8
refs/heads/master: ce21c7bcd796fc4f45d48781b7e85f493cc55ee5
15 changes: 14 additions & 1 deletion trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,20 @@ int platform_device_add(struct platform_device *pdev)
else
dev_set_name(&pdev->dev, pdev->name);

pdev->platform_data = pdev->dev.platform_data;
/* We will remove platform_data field from struct device
* if all platform devices pass its platform specific data
* from platform_device. The conversion is going to be a
* long time, so we allow the two cases coexist to make
* this kind of fix more easily*/
if (pdev->platform_data && pdev->dev.platform_data) {
printk(KERN_ERR
"%s: use which platform_data?\n",
dev_name(&pdev->dev));
} else if (pdev->platform_data) {
pdev->dev.platform_data = pdev->platform_data;
} else if (pdev->dev.platform_data) {
pdev->platform_data = pdev->dev.platform_data;
}

for (i = 0; i < pdev->num_resources; i++) {
struct resource *p, *r = &pdev->resource[i];
Expand Down

0 comments on commit 12f3486

Please sign in to comment.