Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-cor…
Browse files Browse the repository at this point in the history
…e-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
  • Loading branch information
Linus Torvalds committed May 10, 2009
2 parents 93b49d4 + e67c856 commit 0016eff
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Documentation/sysfs-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ versions of the sysfs interface.
"devices" directory at /sys/subsystem/<name>/devices.

If /sys/subsystem exists, /sys/bus, /sys/class and /sys/block can be
ignored. If it does not exist, you have always to scan all three
ignored. If it does not exist, you always have to scan all three
places, as the kernel is free to move a subsystem from one place to
the other, as long as the devices are still reachable by the same
subsystem name.
Expand Down
22 changes: 3 additions & 19 deletions drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ int platform_device_add_data(struct platform_device *pdev, const void *data,
if (d) {
memcpy(d, data, size);
pdev->dev.platform_data = d;
pdev->platform_data = d;
}
return d ? 0 : -ENOMEM;
}
Expand Down Expand Up @@ -247,21 +246,6 @@ int platform_device_add(struct platform_device *pdev)
else
dev_set_name(&pdev->dev, pdev->name);

/* We will remove platform_data field from struct device
* if all platform devices pass its platform specific data
* from platform_device. The conversion is going to be a
* long time, so we allow the two cases coexist to make
* this kind of fix more easily*/
if (pdev->platform_data && pdev->dev.platform_data) {
printk(KERN_ERR
"%s: use which platform_data?\n",
dev_name(&pdev->dev));
} else if (pdev->platform_data) {
pdev->dev.platform_data = pdev->platform_data;
} else if (pdev->dev.platform_data) {
pdev->platform_data = pdev->dev.platform_data;
}

for (i = 0; i < pdev->num_resources; i++) {
struct resource *p, *r = &pdev->resource[i];

Expand Down Expand Up @@ -1028,7 +1012,7 @@ static __initdata LIST_HEAD(early_platform_device_list);

/**
* early_platform_driver_register
* @edrv: early_platform driver structure
* @epdrv: early_platform driver structure
* @buf: string passed from early_param()
*/
int __init early_platform_driver_register(struct early_platform_driver *epdrv,
Expand Down Expand Up @@ -1112,7 +1096,7 @@ void __init early_platform_driver_register_all(char *class_str)

/**
* early_platform_match
* @edrv: early platform driver structure
* @epdrv: early platform driver structure
* @id: id to match against
*/
static __init struct platform_device *
Expand All @@ -1130,7 +1114,7 @@ early_platform_match(struct early_platform_driver *epdrv, int id)

/**
* early_platform_left
* @edrv: early platform driver structure
* @epdrv: early platform driver structure
* @id: return true if id or above exists
*/
static __init int early_platform_left(struct early_platform_driver *epdrv,
Expand Down
9 changes: 2 additions & 7 deletions include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,8 @@ struct device {
struct device_driver *driver; /* which driver has allocated this
device */
void *driver_data; /* data private to the driver */

void *platform_data; /* We will remove platform_data
field if all platform devices
pass its platform specific data
from platform_device->platform_data,
other kind of devices should not
use platform_data. */
void *platform_data; /* Platform specific data, device
core doesn't touch it */
struct dev_pm_info power;

#ifdef CONFIG_NUMA
Expand Down
1 change: 0 additions & 1 deletion include/linux/platform_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ struct platform_device {
struct device dev;
u32 num_resources;
struct resource * resource;
void *platform_data;

struct platform_device_id *id_entry;
};
Expand Down
1 change: 0 additions & 1 deletion lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,6 @@ config DYNAMIC_DEBUG
default n
depends on PRINTK
depends on DEBUG_FS
select PRINTK_DEBUG
help

Compiles debug level messages into the kernel, which would not
Expand Down

0 comments on commit 0016eff

Please sign in to comment.