Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34027
b: refs/heads/master
c: 980ffd3
h: refs/heads/master
i:
  34025: c59da9c
  34023: 83bc519
v: v3
  • Loading branch information
Jeremy Kerr authored and Paul Mackerras committed Jul 7, 2006
1 parent 2f6340d commit 35b6d1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ed14c2177694ce086180eb9ca9ca4c6cd72c7ef
refs/heads/master: 980ffd3258dbcdb011e929de5d658ec81febba8d
24 changes: 0 additions & 24 deletions trunk/arch/powerpc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,27 +189,9 @@ void of_release_dev(struct device *dev)
int of_device_register(struct of_device *ofdev)
{
int rc;
struct of_device **odprop;

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);
if (rc)
return rc;
Expand All @@ -221,14 +203,8 @@ int of_device_register(struct of_device *ofdev)

void of_device_unregister(struct of_device *ofdev)
{
struct of_device **odprop;

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);
}

Expand Down

0 comments on commit 35b6d1b

Please sign in to comment.