batman-adv: Rename batadv_hardif *_free_ref function to *_put
The batman-adv source code is the only place in the kernel which uses the *_free_ref naming scheme for the *_put functions. Changing it to *_put makes it more consistent and makes it easier to understand the connection to the *_get functions. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
This commit is contained in:

committed by
Antonio Quartulli

parent
5d9673109c
commit
82047ad7fe
@@ -226,7 +226,7 @@ static void batadv_primary_if_update_addr(struct batadv_priv *bat_priv,
|
||||
batadv_bla_update_orig_address(bat_priv, primary_if, oldif);
|
||||
out:
|
||||
if (primary_if)
|
||||
batadv_hardif_free_ref(primary_if);
|
||||
batadv_hardif_put(primary_if);
|
||||
}
|
||||
|
||||
static void batadv_primary_if_select(struct batadv_priv *bat_priv,
|
||||
@@ -250,7 +250,7 @@ static void batadv_primary_if_select(struct batadv_priv *bat_priv,
|
||||
|
||||
out:
|
||||
if (curr_hard_iface)
|
||||
batadv_hardif_free_ref(curr_hard_iface);
|
||||
batadv_hardif_put(curr_hard_iface);
|
||||
}
|
||||
|
||||
static bool
|
||||
@@ -409,7 +409,7 @@ batadv_hardif_activate_interface(struct batadv_hard_iface *hard_iface)
|
||||
|
||||
out:
|
||||
if (primary_if)
|
||||
batadv_hardif_free_ref(primary_if);
|
||||
batadv_hardif_put(primary_if);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -562,7 +562,7 @@ err_dev:
|
||||
hard_iface->soft_iface = NULL;
|
||||
dev_put(soft_iface);
|
||||
err:
|
||||
batadv_hardif_free_ref(hard_iface);
|
||||
batadv_hardif_put(hard_iface);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
|
||||
batadv_primary_if_select(bat_priv, new_if);
|
||||
|
||||
if (new_if)
|
||||
batadv_hardif_free_ref(new_if);
|
||||
batadv_hardif_put(new_if);
|
||||
}
|
||||
|
||||
bat_priv->bat_algo_ops->bat_iface_disable(hard_iface);
|
||||
@@ -616,11 +616,11 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
|
||||
}
|
||||
|
||||
hard_iface->soft_iface = NULL;
|
||||
batadv_hardif_free_ref(hard_iface);
|
||||
batadv_hardif_put(hard_iface);
|
||||
|
||||
out:
|
||||
if (primary_if)
|
||||
batadv_hardif_free_ref(primary_if);
|
||||
batadv_hardif_put(primary_if);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -639,7 +639,7 @@ static void batadv_hardif_remove_interface_finish(struct work_struct *work)
|
||||
|
||||
batadv_debugfs_del_hardif(hard_iface);
|
||||
batadv_sysfs_del_hardif(&hard_iface->hardif_obj);
|
||||
batadv_hardif_free_ref(hard_iface);
|
||||
batadv_hardif_put(hard_iface);
|
||||
}
|
||||
|
||||
static struct batadv_hard_iface *
|
||||
@@ -794,10 +794,10 @@ static int batadv_hard_if_event(struct notifier_block *this,
|
||||
}
|
||||
|
||||
hardif_put:
|
||||
batadv_hardif_free_ref(hard_iface);
|
||||
batadv_hardif_put(hard_iface);
|
||||
out:
|
||||
if (primary_if)
|
||||
batadv_hardif_free_ref(primary_if);
|
||||
batadv_hardif_put(primary_if);
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user