diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 18:18:40 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 18:18:40 -0400 |
commit | fc05505b77f7900a1bb74fb3f3a4343dee4265a4 (patch) | |
tree | 6517919cb60bd9465078512cacbefd8c77f94b76 /drivers/base/platform.c | |
parent | a2ab67fae1ab9226679495a8d260f4e6555efc5f (diff) | |
parent | 11c79740d3c03cb81f84e98cf2e2dbd8d9bb53cd (diff) |
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 into devel
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 22 |
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 | */ |
1034 | int __init early_platform_driver_register(struct early_platform_driver *epdrv, | 1018 | int __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 | */ |
1118 | static __init struct platform_device * | 1102 | static __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 | */ |
1136 | static __init int early_platform_left(struct early_platform_driver *epdrv, | 1120 | static __init int early_platform_left(struct early_platform_driver *epdrv, |