device: fall back to simple interface status check if not provided by the device...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 26 Jun 2014 10:17:46 +0000 (12:17 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 26 Jun 2014 10:17:46 +0000 (12:17 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
device.c

index 7d606c6..b16f156 100644 (file)
--- a/device.c
+++ b/device.c
@@ -262,7 +262,7 @@ void device_release(struct device_user *dep)
 int device_check_state(struct device *dev)
 {
        if (!dev->type->check_state)
-               return 0;
+               return simple_device_type.check_state(dev);
 
        return dev->type->check_state(dev);
 }