alias: if the underlying device changes (or goes away), set the device present status...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 22 Jan 2013 16:04:40 +0000 (17:04 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 22 Jan 2013 16:04:47 +0000 (17:04 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
alias.c

diff --git a/alias.c b/alias.c
index e4f28e52c277b55a908d7879e3edac2b8d674772..185a5d25b3a37908ec142c41cac4861853c43720 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -37,6 +37,7 @@ static void alias_set_device(struct alias_device *alias, struct device *dev)
        if (dev == alias->dep.dev)
                return;
 
+       device_set_present(&alias->dev, false);
        device_remove_user(&alias->new_dep);
        if (alias->dev.active) {
                if (dev)