summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-04 15:00:25 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-09-04 15:00:25 +0200
commit4e335f640fadda81aff9dd2dc06703961bea2826 (patch)
treebc9618ea20fdd6328f534488413dadd5530146ce /interface.c
parentdca8c7133b1db463f6ae71ccc6d34cd12735daef (diff)
make device_claim/device_release operate on the device_user instead of the device to avoid refcount bugs
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/interface.c b/interface.c
index f08fee0..f6c32f4 100644
--- a/interface.c
+++ b/interface.c
@@ -89,7 +89,7 @@ static void
mark_interface_down(struct interface *iface)
{
interface_del_ctx_addr(iface, NULL);
- device_release(iface->main_dev.dev);
+ device_release(&iface->main_dev);
iface->state = IFS_DOWN;
}
@@ -101,7 +101,7 @@ __interface_set_up(struct interface *iface)
if (iface->state != IFS_DOWN)
return 0;
- ret = device_claim(iface->main_dev.dev);
+ ret = device_claim(&iface->main_dev);
if (ret)
return ret;