Commit 980ffd32 authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Paul Mackerras

[POWERPC] Remove linux,device properties

The linux,device property isn't used anywhere within the kernel, and
since it's a kernel pointer, it's a little useless for userspace.

This change removes the code to create this property in
of_device_register.

Built for pmac32.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7ed14c21
...@@ -189,27 +189,9 @@ void of_release_dev(struct device *dev) ...@@ -189,27 +189,9 @@ void of_release_dev(struct device *dev)
int of_device_register(struct of_device *ofdev) int of_device_register(struct of_device *ofdev)
{ {
int rc; int rc;
struct of_device **odprop;
BUG_ON(ofdev->node == NULL); BUG_ON(ofdev->node == NULL);
odprop = (struct of_device **)get_property(ofdev->node, "linux,device", NULL);
if (!odprop) {
struct property *new_prop;
new_prop = kmalloc(sizeof(struct property) + sizeof(struct of_device *),
GFP_KERNEL);
if (new_prop == NULL)
return -ENOMEM;
new_prop->name = "linux,device";
new_prop->length = sizeof(sizeof(struct of_device *));
new_prop->value = (unsigned char *)&new_prop[1];
odprop = (struct of_device **)new_prop->value;
*odprop = NULL;
prom_add_property(ofdev->node, new_prop);
}
*odprop = ofdev;
rc = device_register(&ofdev->dev); rc = device_register(&ofdev->dev);
if (rc) if (rc)
return rc; return rc;
...@@ -221,14 +203,8 @@ int of_device_register(struct of_device *ofdev) ...@@ -221,14 +203,8 @@ int of_device_register(struct of_device *ofdev)
void of_device_unregister(struct of_device *ofdev) void of_device_unregister(struct of_device *ofdev)
{ {
struct of_device **odprop;
device_remove_file(&ofdev->dev, &dev_attr_devspec); device_remove_file(&ofdev->dev, &dev_attr_devspec);
odprop = (struct of_device **)get_property(ofdev->node, "linux,device", NULL);
if (odprop)
*odprop = NULL;
device_unregister(&ofdev->dev); device_unregister(&ofdev->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment