diff options
author | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | 2010-01-02 11:30:51 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:36 -0800 |
commit | abad5446585b0b9519fad00c05156f373ea114ad (patch) | |
tree | e2b09bb5a418d9bd0f78c88a85b51e857c42ddbf /drivers/staging/batman-adv/originator.c | |
parent | b9b27e4ef6313449a6b40a21e0e9a1bdd9a1d8ce (diff) |
Staging: batman-adv: Remove compat.h
Since we are now part of mainline, we don't need compat.h to allow
building of the module with old versions of the kernel.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/originator.c')
-rw-r--r-- | drivers/staging/batman-adv/originator.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index a60dbe1cf6b..29c241119a3 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -26,8 +26,6 @@ #include "hash.h" #include "translation-table.h" #include "routing.h" -#include "compat.h" - static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig); @@ -80,11 +78,10 @@ create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, bat_dbg(DBG_BATMAN, "Creating new last-hop neighbor of originator\n"); - neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); + neigh_node = kzalloc(sizeof(struct neigh_node), GFP_ATOMIC); if (!neigh_node) return NULL; - memset(neigh_node, 0, sizeof(struct neigh_node)); INIT_LIST_HEAD(&neigh_node->list); memcpy(neigh_node->addr, neigh, ETH_ALEN); @@ -131,11 +128,10 @@ struct orig_node *get_orig_node(uint8_t *addr) bat_dbg(DBG_BATMAN, "Creating new originator: %pM \n", addr); - orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); + orig_node = kzalloc(sizeof(struct orig_node), GFP_ATOMIC); if (!orig_node) return NULL; - memset(orig_node, 0, sizeof(struct orig_node)); INIT_LIST_HEAD(&orig_node->neigh_list); memcpy(orig_node->orig, addr, ETH_ALEN); @@ -145,19 +141,15 @@ struct orig_node *get_orig_node(uint8_t *addr) size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; - orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); + orig_node->bcast_own = kzalloc(size, GFP_ATOMIC); if (!orig_node->bcast_own) goto free_orig_node; - memset(orig_node->bcast_own, 0, size); - size = num_ifs * sizeof(uint8_t); - orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); + orig_node->bcast_own_sum = kzalloc(size, GFP_ATOMIC); if (!orig_node->bcast_own_sum) goto free_bcast_own; - memset(orig_node->bcast_own_sum, 0, size); - if (hash_add(orig_hash, orig_node) < 0) goto free_bcast_own_sum; |