free(dev);
}
-static void broadcast_device_event(struct device *dev, enum device_event ev)
+static void device_broadcast_event(struct device *dev, enum device_event ev)
{
struct device_user *dep, *tmp;
if (++dev->active != 1)
return 0;
- broadcast_device_event(dev, DEV_EVENT_SETUP);
+ device_broadcast_event(dev, DEV_EVENT_SETUP);
ret = dev->set_state(dev, true);
if (ret == 0)
- broadcast_device_event(dev, DEV_EVENT_UP);
+ device_broadcast_event(dev, DEV_EVENT_UP);
else
dev->active = 0;
if (dev->active)
return;
- broadcast_device_event(dev, DEV_EVENT_TEARDOWN);
+ device_broadcast_event(dev, DEV_EVENT_TEARDOWN);
dev->set_state(dev, false);
- broadcast_device_event(dev, DEV_EVENT_DOWN);
+ device_broadcast_event(dev, DEV_EVENT_DOWN);
}
int check_device_state(struct device *dev)
DPRINTF("Device '%s' %s present\n", dev->ifname, state ? "is now" : "is no longer" );
dev->present = state;
- broadcast_device_event(dev, state ? DEV_EVENT_ADD : DEV_EVENT_REMOVE);
+ device_broadcast_event(dev, state ? DEV_EVENT_ADD : DEV_EVENT_REMOVE);
}
void device_add_user(struct device_user *dep, struct device *dev)