summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2009-03-13 23:06:59 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-05-08 19:22:21 -0700
commitbee86321b7b2312fbb62f4cb903eba1cca45e8ad (patch)
treeccfc761adc4ffab4948feda94a05840f3fcfa36a /drivers/base
parentfe0e2bb9b3ca55b78e637b1260faeaa951523959 (diff)
Revert driver core: fix passing platform_data
This reverts commit ce21c7bcd796fc4f45d48781b7e85f493cc55ee5: We will remove platform_data field from struct device until all platform devices pass its specific data from platfom_device and all platform drivers use platform specific data passed by platform_device->platform_data. This kind of conversion will need a long time, for thousands of files is affected. To make the conversion easily, we allow platform specific data passed by struct device or struct platform_device and platform driver may use it from struct device or struct platform_device. As we really don't want to do this at all. Cc: David Brownell <david-b@pacbell.net> Cc: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-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 ec5400c3202..d1d0ee43192 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -247,20 +247,7 @@ int platform_device_add(struct platform_device *pdev)
else
dev_set_name(&pdev->dev, pdev->name);
- /* 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;
- }
+ pdev->platform_data = pdev->dev.platform_data;
for (i = 0; i < pdev->num_resources; i++) {
struct resource *p, *r = &pdev->resource[i];