From 0358e84210b5c97b82b256a5909365555a5f7131 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 24 Jan 2015 01:28:39 +0100 Subject: [PATCH] device: force changes to be applied via state change if necessary Signed-off-by: Felix Fietkau --- device.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.25.1