From: Felix Fietkau Date: Sat, 24 Jan 2015 00:28:39 +0000 (+0100) Subject: device: force changes to be applied via state change if necessary X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0358e84210b5c97b82b256a5909365555a5f7131;p=oweals%2Fnetifd.git device: force changes to be applied via state change if necessary Signed-off-by: Felix Fietkau --- diff --git a/device.c b/device.c index 66eb261..54638e7 100644 --- a/device.c +++ b/device.c @@ -636,6 +636,10 @@ device_apply_config(struct device *dev, const struct device_type *type, dev->config = config; if (change == DEV_CONFIG_RESTART && dev->present) { device_set_present(dev, false); + if (dev->active && !dev->external) { + dev->set_state(dev, false); + dev->set_state(dev, true); + } device_set_present(dev, true); } break;