aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index b5b6c973a2e0..8b4708e06244 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -217,7 +217,6 @@ int platform_device_add_data(struct platform_device *pdev, const void *data,
217 if (d) { 217 if (d) {
218 memcpy(d, data, size); 218 memcpy(d, data, size);
219 pdev->dev.platform_data = d; 219 pdev->dev.platform_data = d;
220 pdev->platform_data = d;
221 } 220 }
222 return d ? 0 : -ENOMEM; 221 return d ? 0 : -ENOMEM;
223} 222}
@@ -247,21 +246,6 @@ int platform_device_add(struct platform_device *pdev)
247 else 246 else
248 dev_set_name(&pdev->dev, pdev->name); 247 dev_set_name(&pdev->dev, pdev->name);
249 248
250 /* We will remove platform_data field from struct device
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
265 for (i = 0; i < pdev->num_resources; i++) { 249 for (i = 0; i < pdev->num_resources; i++) {
266 struct resource *p, *r = &pdev->resource[i]; 250 struct resource *p, *r = &pdev->resource[i];
267 251
@@ -1028,7 +1012,7 @@ static __initdata LIST_HEAD(early_platform_device_list);
1028 1012
1029/** 1013/**
1030 * early_platform_driver_register 1014 * early_platform_driver_register
1031 * @edrv: early_platform driver structure 1015 * @epdrv: early_platform driver structure
1032 * @buf: string passed from early_param() 1016 * @buf: string passed from early_param()
1033 */ 1017 */
1034int __init early_platform_driver_register(struct early_platform_driver *epdrv, 1018int __init early_platform_driver_register(struct early_platform_driver *epdrv,
@@ -1112,7 +1096,7 @@ void __init early_platform_driver_register_all(char *class_str)
1112 1096
1113/** 1097/**
1114 * early_platform_match 1098 * early_platform_match
1115 * @edrv: early platform driver structure 1099 * @epdrv: early platform driver structure
1116 * @id: id to match against 1100 * @id: id to match against
1117 */ 1101 */
1118static __init struct platform_device * 1102static __init struct platform_device *
@@ -1130,7 +1114,7 @@ early_platform_match(struct early_platform_driver *epdrv, int id)
1130 1114
1131/** 1115/**
1132 * early_platform_left 1116 * early_platform_left
1133 * @edrv: early platform driver structure 1117 * @epdrv: early platform driver structure
1134 * @id: return true if id or above exists 1118 * @id: return true if id or above exists
1135 */ 1119 */
1136static __init int early_platform_left(struct early_platform_driver *epdrv, 1120static __init int early_platform_left(struct early_platform_driver *epdrv,