[OpenWrt-Devel] [PATCH netifd 2/7] bridge: Make bridge_device_type static
Hans Dedecker
dedeckeh at gmail.com
Fri Sep 23 09:08:18 EDT 2016
Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
bridge.c | 2 +-
device.h | 1 -
wireless.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/bridge.c b/bridge.c
index 98e237b..8e6c9a6 100644
--- 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,
diff --git a/device.h b/device.h
index f3ca957..2af93bb 100644
--- 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);
diff --git a/wireless.c b/wireless.c
index be94c34..9109ce1 100644
--- a/wireless.c
+++ b/wireless.c
@@ -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;
}
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list