aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/platform.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ec5400c32021..d1d0ee431926 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -247,20 +247,7 @@ int platform_device_add(struct platform_device *pdev)
247 else 247 else
248 dev_set_name(&pdev->dev, pdev->name); 248 dev_set_name(&pdev->dev, pdev->name);
249 249
250 /* We will remove platform_data field from struct device 250 pdev->platform_data = pdev->dev.platform_data;
251 * if all platform devices pass its platform specific data
252 * from platform_device. The conversion is going to be a
253 * long time, so we allow the two cases coexist to make
254 * this kind of fix more easily*/
255 if (pdev->platform_data && pdev->dev.platform_data) {
256 printk(KERN_ERR
257 "%s: use which platform_data?\n",
258 dev_name(&pdev->dev));
259 } else if (pdev->platform_data) {
260 pdev->dev.platform_data = pdev->platform_data;
261 } else if (pdev->dev.platform_data) {
262 pdev->platform_data = pdev->dev.platform_data;
263 }
264 251
265 for (i = 0; i < pdev->num_resources; i++) { 252 for (i = 0; i < pdev->num_resources; i++) {
266 struct resource *p, *r = &pdev->resource[i]; 253 struct resource *p, *r = &pdev->resource[i];