Commit bee86321b7b2312fbb62f4cb903eba1cca45e8ad
Committed by
Greg Kroah-Hartman
1 parent
fe0e2bb9b3
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 1 additions and 14 deletions Side-by-side Diff
drivers/base/platform.c
... | ... | @@ -247,20 +247,7 @@ |
247 | 247 | else |
248 | 248 | dev_set_name(&pdev->dev, pdev->name); |
249 | 249 | |
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 | - } | |
250 | + pdev->platform_data = pdev->dev.platform_data; | |
264 | 251 | |
265 | 252 | for (i = 0; i < pdev->num_resources; i++) { |
266 | 253 | struct resource *p, *r = &pdev->resource[i]; |