Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Allen Pais and committed by
Jakub Kicinski
b5bd8b62 da1cad73

+3 -5
+3 -5
net/mac802154/main.c
··· 20 20 #include "ieee802154_i.h" 21 21 #include "cfg.h" 22 22 23 - static void ieee802154_tasklet_handler(unsigned long data) 23 + static void ieee802154_tasklet_handler(struct tasklet_struct *t) 24 24 { 25 - struct ieee802154_local *local = (struct ieee802154_local *)data; 25 + struct ieee802154_local *local = from_tasklet(local, t, tasklet); 26 26 struct sk_buff *skb; 27 27 28 28 while ((skb = skb_dequeue(&local->skb_queue))) { ··· 91 91 INIT_LIST_HEAD(&local->interfaces); 92 92 mutex_init(&local->iflist_mtx); 93 93 94 - tasklet_init(&local->tasklet, 95 - ieee802154_tasklet_handler, 96 - (unsigned long)local); 94 + tasklet_setup(&local->tasklet, ieee802154_tasklet_handler); 97 95 98 96 skb_queue_head_init(&local->skb_queue); 99 97