aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/soft-interface.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2011-05-14 17:14:50 -0400
committerSven Eckelmann <sven@narfation.org>2011-05-30 01:39:31 -0400
commit747e4221a03cde62402b614ca1f8e961b8416130 (patch)
tree98428064fef191a5093e276d5a779b9e801a97f0 /net/batman-adv/soft-interface.c
parent38e3c5f0dae7a3bbb32c3b2bb28c3f2557d40fe9 (diff)
batman-adv: Add const type qualifier for pointers
batman-adv uses pointers which are marked as const and should not violate that type qualifier by passing it to functions which force a cast to the non-const version. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r--net/batman-adv/soft-interface.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index d5aa60999e83..1bec3a0f9721 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -146,7 +146,7 @@ out:
146} 146}
147 147
148static struct softif_neigh *softif_neigh_get(struct bat_priv *bat_priv, 148static struct softif_neigh *softif_neigh_get(struct bat_priv *bat_priv,
149 uint8_t *addr, short vid) 149 const uint8_t *addr, short vid)
150{ 150{
151 struct softif_neigh_vid *softif_neigh_vid; 151 struct softif_neigh_vid *softif_neigh_vid;
152 struct softif_neigh *softif_neigh = NULL; 152 struct softif_neigh *softif_neigh = NULL;
@@ -793,7 +793,7 @@ static void interface_setup(struct net_device *dev)
793 memset(priv, 0, sizeof(struct bat_priv)); 793 memset(priv, 0, sizeof(struct bat_priv));
794} 794}
795 795
796struct net_device *softif_create(char *name) 796struct net_device *softif_create(const char *name)
797{ 797{
798 struct net_device *soft_iface; 798 struct net_device *soft_iface;
799 struct bat_priv *bat_priv; 799 struct bat_priv *bat_priv;
@@ -872,7 +872,7 @@ void softif_destroy(struct net_device *soft_iface)
872 unregister_netdevice(soft_iface); 872 unregister_netdevice(soft_iface);
873} 873}
874 874
875int softif_is_valid(struct net_device *net_dev) 875int softif_is_valid(const struct net_device *net_dev)
876{ 876{
877#ifdef HAVE_NET_DEVICE_OPS 877#ifdef HAVE_NET_DEVICE_OPS
878 if (net_dev->netdev_ops->ndo_start_xmit == interface_tx) 878 if (net_dev->netdev_ops->ndo_start_xmit == interface_tx)
@@ -924,4 +924,3 @@ static u32 bat_get_link(struct net_device *dev)
924{ 924{
925 return 1; 925 return 1;
926} 926}
927