9
0
Fork 0

device: remove parameters when unregistering a device

Otherwise we loose memory on each device_unregister. The ethernet
code used to do this before calling unregister_device. This can
now be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2014-01-14 10:24:23 +01:00
parent f0bd826abe
commit d23af7a0a0
2 changed files with 2 additions and 2 deletions

View File

@ -182,6 +182,8 @@ int unregister_device(struct device_d *old_dev)
dev_dbg(old_dev, "unregister\n");
dev_remove_parameters(old_dev);
if (old_dev->driver)
old_dev->bus->remove(old_dev);

View File

@ -380,8 +380,6 @@ void eth_unregister(struct eth_device *edev)
if (edev == eth_current)
eth_current = NULL;
dev_remove_parameters(&edev->dev);
if (IS_ENABLED(CONFIG_OFDEVICE) && edev->nodepath)
free(edev->nodepath);