aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-10 13:49:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-10 13:49:31 -0400
commit0016effb90589a87290a2ee721e34dc37e87b67c (patch)
tree6e52adab5fd775a62edfad7f373916b8d1b31ba6 /drivers
parent93b49d45eb97574057ee03dfdd590c209f5132f8 (diff)
parente67c85626cd02e306da1b4195bfaf68d61050796 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: Revert driver core: move platform_data into platform_device Revert driver core: fix passing platform_data Remove old PRINTK_DEBUG config item Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense Driver core: platform: fix kernel-doc warnings
Diffstat (limited to 'drivers')
-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,