Commit b5bd8b62 authored by Allen Pais's avatar Allen Pais Committed by Jakub Kicinski

net: mac802154: convert tasklets to use new tasklet_setup() API

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: default avatarStefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <apais@linux.microsoft.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent da1cad73
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
#include "ieee802154_i.h" #include "ieee802154_i.h"
#include "cfg.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; struct sk_buff *skb;
while ((skb = skb_dequeue(&local->skb_queue))) { while ((skb = skb_dequeue(&local->skb_queue))) {
...@@ -91,9 +91,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops) ...@@ -91,9 +91,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
INIT_LIST_HEAD(&local->interfaces); INIT_LIST_HEAD(&local->interfaces);
mutex_init(&local->iflist_mtx); mutex_init(&local->iflist_mtx);
tasklet_init(&local->tasklet, tasklet_setup(&local->tasklet, ieee802154_tasklet_handler);
ieee802154_tasklet_handler,
(unsigned long)local);
skb_queue_head_init(&local->skb_queue); skb_queue_head_init(&local->skb_queue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment