From 747e4221a03cde62402b614ca1f8e961b8416130 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 14 May 2011 23:14:50 +0200 Subject: 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 --- net/batman-adv/soft-interface.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'net/batman-adv/soft-interface.c') 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: } static struct softif_neigh *softif_neigh_get(struct bat_priv *bat_priv, - uint8_t *addr, short vid) + const uint8_t *addr, short vid) { struct softif_neigh_vid *softif_neigh_vid; struct softif_neigh *softif_neigh = NULL; @@ -793,7 +793,7 @@ static void interface_setup(struct net_device *dev) memset(priv, 0, sizeof(struct bat_priv)); } -struct net_device *softif_create(char *name) +struct net_device *softif_create(const char *name) { struct net_device *soft_iface; struct bat_priv *bat_priv; @@ -872,7 +872,7 @@ void softif_destroy(struct net_device *soft_iface) unregister_netdevice(soft_iface); } -int softif_is_valid(struct net_device *net_dev) +int softif_is_valid(const struct net_device *net_dev) { #ifdef HAVE_NET_DEVICE_OPS if (net_dev->netdev_ops->ndo_start_xmit == interface_tx) @@ -924,4 +924,3 @@ static u32 bat_get_link(struct net_device *dev) { return 1; } - -- cgit v1.2.3