As no code requests the interface name from the device struct,
remove the attribute and associated code.
---
 include/device.h |  2 --
 src/device.c     | 26 --------------------------
 2 files changed, 28 deletions(-)

diff --git a/include/device.h b/include/device.h
index 57b925c..d97f84d 100644
--- a/include/device.h
+++ b/include/device.h
@@ -70,8 +70,6 @@ void connman_device_unref_debug(struct connman_device *device,
 enum connman_device_type connman_device_get_type(struct connman_device 
*device);
 void connman_device_set_index(struct connman_device *device, int index);
 int connman_device_get_index(struct connman_device *device);
-void connman_device_set_interface(struct connman_device *device,
-                                               const char *interface);
 
 void connman_device_set_ident(struct connman_device *device,
                                                const char *ident);
diff --git a/src/device.c b/src/device.c
index a97d790..a527c28 100644
--- a/src/device.c
+++ b/src/device.c
@@ -57,7 +57,6 @@ struct connman_device {
        char *name;
        char *node;
        char *address;
-       char *interface;
        char *ident;
        char *path;
        int index;
@@ -383,7 +382,6 @@ static void device_destruct(struct connman_device *device)
        g_free(device->node);
        g_free(device->name);
        g_free(device->address);
-       g_free(device->interface);
        g_free(device->path);
 
        g_free(device->last_network);
@@ -511,27 +509,6 @@ int connman_device_get_index(struct connman_device *device)
 }
 
 /**
- * connman_device_set_interface:
- * @device: device structure
- * @interface: interface name
- *
- * Set interface name of device
- */
-void connman_device_set_interface(struct connman_device *device,
-                                               const char *interface)
-{
-       g_free(device->interface);
-       device->interface = g_strdup(interface);
-
-       if (!device->name) {
-               const char *str = type2description(device->type);
-               if (str && device->interface)
-                       device->name = g_strdup_printf("%s (%s)", str,
-                                                       device->interface);
-       }
-}
-
-/**
  * connman_device_set_ident:
  * @device: device structure
  * @ident: unique identifier
@@ -825,8 +802,6 @@ const char *connman_device_get_string(struct connman_device 
*device,
                return device->name;
        else if (g_str_equal(key, "Node"))
                return device->node;
-       else if (g_str_equal(key, "Interface"))
-               return device->interface;
        else if (g_str_equal(key, "Path"))
                return device->path;
 
@@ -1291,7 +1266,6 @@ struct connman_device 
*connman_device_create_from_index(int index)
        }
 
        connman_device_set_index(device, index);
-       connman_device_set_interface(device, devname);
 
        if (ident) {
                connman_device_set_ident(device, ident);
-- 
1.9.1

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to