diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:49:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:49:31 -0400 |
commit | 0016effb90589a87290a2ee721e34dc37e87b67c (patch) | |
tree | 6e52adab5fd775a62edfad7f373916b8d1b31ba6 | |
parent | 93b49d45eb97574057ee03dfdd590c209f5132f8 (diff) | |
parent | e67c85626cd02e306da1b4195bfaf68d61050796 (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
-rw-r--r-- | Documentation/sysfs-rules.txt | 2 | ||||
-rw-r--r-- | drivers/base/platform.c | 22 | ||||
-rw-r--r-- | include/linux/device.h | 9 | ||||
-rw-r--r-- | include/linux/platform_device.h | 1 | ||||
-rw-r--r-- | lib/Kconfig.debug | 1 |
5 files changed, 6 insertions, 29 deletions
diff --git a/Documentation/sysfs-rules.txt b/Documentation/sysfs-rules.txt index 6049a2a84dda..5d8bc2cd250c 100644 --- a/Documentation/sysfs-rules.txt +++ b/Documentation/sysfs-rules.txt | |||
@@ -113,7 +113,7 @@ versions of the sysfs interface. | |||
113 | "devices" directory at /sys/subsystem/<name>/devices. | 113 | "devices" directory at /sys/subsystem/<name>/devices. |
114 | 114 | ||
115 | If /sys/subsystem exists, /sys/bus, /sys/class and /sys/block can be | 115 | If /sys/subsystem exists, /sys/bus, /sys/class and /sys/block can be |
116 | ignored. If it does not exist, you have always to scan all three | 116 | ignored. If it does not exist, you always have to scan all three |
117 | places, as the kernel is free to move a subsystem from one place to | 117 | places, as the kernel is free to move a subsystem from one place to |
118 | the other, as long as the devices are still reachable by the same | 118 | the other, as long as the devices are still reachable by the same |
119 | subsystem name. | 119 | subsystem name. |
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, |
diff --git a/include/linux/device.h b/include/linux/device.h index 6a69caaac18a..5d5c197bad45 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -384,13 +384,8 @@ struct device { | |||
384 | struct device_driver *driver; /* which driver has allocated this | 384 | struct device_driver *driver; /* which driver has allocated this |
385 | device */ | 385 | device */ |
386 | void *driver_data; /* data private to the driver */ | 386 | void *driver_data; /* data private to the driver */ |
387 | 387 | void *platform_data; /* Platform specific data, device | |
388 | void *platform_data; /* We will remove platform_data | 388 | core doesn't touch it */ |
389 | field if all platform devices | ||
390 | pass its platform specific data | ||
391 | from platform_device->platform_data, | ||
392 | other kind of devices should not | ||
393 | use platform_data. */ | ||
394 | struct dev_pm_info power; | 389 | struct dev_pm_info power; |
395 | 390 | ||
396 | #ifdef CONFIG_NUMA | 391 | #ifdef CONFIG_NUMA |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 72736fd8223c..b67bb5d7b221 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -20,7 +20,6 @@ struct platform_device { | |||
20 | struct device dev; | 20 | struct device dev; |
21 | u32 num_resources; | 21 | u32 num_resources; |
22 | struct resource * resource; | 22 | struct resource * resource; |
23 | void *platform_data; | ||
24 | 23 | ||
25 | struct platform_device_id *id_entry; | 24 | struct platform_device_id *id_entry; |
26 | }; | 25 | }; |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 812c28207baf..6cdcf38f2da9 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -891,7 +891,6 @@ config DYNAMIC_DEBUG | |||
891 | default n | 891 | default n |
892 | depends on PRINTK | 892 | depends on PRINTK |
893 | depends on DEBUG_FS | 893 | depends on DEBUG_FS |
894 | select PRINTK_DEBUG | ||
895 | help | 894 | help |
896 | 895 | ||
897 | Compiles debug level messages into the kernel, which would not | 896 | Compiles debug level messages into the kernel, which would not |