]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/bonding/bond_sysfs.c
Merge remote-tracking branch 'driver-core/driver-core-next'
[karo-tx-linux.git] / drivers / net / bonding / bond_sysfs.c
index 47749c970a01a67c189188767c41e94e2ff1fbd1..b9d8f1175ff500bd5cc290e676c5f1322fd7c72b 100644 (file)
@@ -149,14 +149,6 @@ err_no_cmd:
        return -EPERM;
 }
 
-static const void *bonding_namespace(struct class *cls,
-                                    const struct class_attribute *attr)
-{
-       const struct bond_net *bn =
-               container_of(attr, struct bond_net, class_attr_bonding_masters);
-       return bn->net;
-}
-
 /* class attribute for bond_masters file.  This ends up in /sys/class/net */
 static const struct class_attribute class_attr_bonding_masters = {
        .attr = {
@@ -165,7 +157,6 @@ static const struct class_attribute class_attr_bonding_masters = {
        },
        .show = bonding_show_bonds,
        .store = bonding_store_bonds,
-       .namespace = bonding_namespace,
 };
 
 /*
@@ -1690,7 +1681,8 @@ int bond_create_sysfs(struct bond_net *bn)
        bn->class_attr_bonding_masters = class_attr_bonding_masters;
        sysfs_attr_init(&bn->class_attr_bonding_masters.attr);
 
-       ret = netdev_class_create_file(&bn->class_attr_bonding_masters);
+       ret = netdev_class_create_file_ns(&bn->class_attr_bonding_masters,
+                                         bn->net);
        /*
         * Permit multiple loads of the module by ignoring failures to
         * create the bonding_masters sysfs file.  Bonding devices
@@ -1720,7 +1712,7 @@ int bond_create_sysfs(struct bond_net *bn)
  */
 void bond_destroy_sysfs(struct bond_net *bn)
 {
-       netdev_class_remove_file(&bn->class_attr_bonding_masters);
+       netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, bn->net);
 }
 
 /*