Skip to content

Commit

Permalink
net: mac802154: convert tasklets to use new tasklet_setup() API
Browse files Browse the repository at this point in the history
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Acked-by: Stefan Schmidt <[email protected]>
Signed-off-by: Romain Perier <[email protected]>
Signed-off-by: Allen Pais <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
allenpais authored and kuba-moo committed Nov 7, 2020
1 parent da1cad7 commit b5bd8b6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/mac802154/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include "ieee802154_i.h"
#include "cfg.h"

static void ieee802154_tasklet_handler(unsigned long data)
static void ieee802154_tasklet_handler(struct tasklet_struct *t)
{
struct ieee802154_local *local = (struct ieee802154_local *)data;
struct ieee802154_local *local = from_tasklet(local, t, tasklet);
struct sk_buff *skb;

while ((skb = skb_dequeue(&local->skb_queue))) {
Expand Down Expand Up @@ -91,9 +91,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
INIT_LIST_HEAD(&local->interfaces);
mutex_init(&local->iflist_mtx);

tasklet_init(&local->tasklet,
ieee802154_tasklet_handler,
(unsigned long)local);
tasklet_setup(&local->tasklet, ieee802154_tasklet_handler);

skb_queue_head_init(&local->skb_queue);

Expand Down

0 comments on commit b5bd8b6

Please sign in to comment.