X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface.c;h=ba7b5e52740162ecbc8dfaa1a39255cc17bc7bbe;hp=e12d3569dfe0b4ada12ec8cb4139d0a50eab8841;hb=dc4d06fd667a399bfa77da1cb2eb4487ebeba498;hpb=8865846b6bb679ef917d3546113790978eb9f1a0 diff --git a/interface.c b/interface.c index e12d356..ba7b5e5 100644 --- a/interface.c +++ b/interface.c @@ -3,6 +3,8 @@ #include #include "netifd.h" +#include "device.h" +#include "interface.h" #include "proto.h" #include "ubus.h" @@ -224,12 +226,12 @@ get_interface(const char *name) } void -interface_remove_link(struct interface *iface, struct device *llif) +interface_remove_link(struct interface *iface, struct device *dev) { - struct device *dev = iface->main_dev.dev; + struct device *mdev = iface->main_dev.dev; - if (dev && dev->hotplug_ops) { - dev->hotplug_ops->del(dev, llif); + if (mdev && mdev->hotplug_ops) { + mdev->hotplug_ops->del(mdev, dev); return; } @@ -237,17 +239,17 @@ interface_remove_link(struct interface *iface, struct device *llif) } int -interface_add_link(struct interface *iface, struct device *llif) +interface_add_link(struct interface *iface, struct device *dev) { - struct device *dev = iface->main_dev.dev; + struct device *mdev = iface->main_dev.dev; - if (dev && dev->hotplug_ops) - return dev->hotplug_ops->add(dev, llif); + if (mdev && mdev->hotplug_ops) + return mdev->hotplug_ops->add(mdev, dev); if (iface->main_dev.dev) interface_remove_link(iface, NULL); - add_device_user(&iface->main_dev, llif); + add_device_user(&iface->main_dev, dev); return 0; }