bridge: Make bridge_device_type static
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 23 Sep 2016 13:08:18 +0000 (15:08 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 26 Sep 2016 09:51:19 +0000 (11:51 +0200)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
bridge.c
device.h
wireless.c

index 98e237b394d86c39f86aeeb0ff9d91374afdf46c..8e6c9a61e6300837ff2f39f8f379f176c4f14aa7 100644 (file)
--- a/bridge.c
+++ b/bridge.c
@@ -80,7 +80,7 @@ static void bridge_dump_info(struct device *dev, struct blob_buf *b);
 enum dev_change_type
 bridge_reload(struct device *dev, struct blob_attr *attr);
 
-struct device_type bridge_device_type = {
+static struct device_type bridge_device_type = {
        .name = "bridge",
        .config_params = &bridge_attr_list,
 
index f3ca95768edb0767d5972a6e303fb86eb7a0ff16..2af93bb16fad798d5bc8e719f09a7501c40f2046 100644 (file)
--- a/device.h
+++ b/device.h
@@ -226,7 +226,6 @@ struct device_hotplug_ops {
 
 extern const struct uci_blob_param_list device_attr_list;
 extern struct device_type simple_device_type;
-extern struct device_type bridge_device_type;
 extern struct device_type tunnel_device_type;
 
 void device_lock(void);
index be94c34a450bc21450bd40e1d123d16780e4a503..9109ce199cb38ad6456a916d3ff244e56377042b 100644 (file)
@@ -83,7 +83,7 @@ vif_config_add_bridge(struct blob_buf *buf, struct blob_attr *networks, bool pre
                if (!dev)
                        return;
 
-               if (dev->type != &bridge_device_type)
+               if (!dev->type->bridge_capability)
                        return;
        }