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

ppp: use new tasklet API

This converts the async and synctty drivers to use the new tasklet API n
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Emil Renner Berthing and committed by
Jakub Kicinski
64ca5aba 08267523

+8 -8
+4 -4
drivers/net/ppp/ppp_async.c
··· 101 101 char *flags, int count); 102 102 static int ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, 103 103 unsigned long arg); 104 - static void ppp_async_process(unsigned long arg); 104 + static void ppp_async_process(struct tasklet_struct *t); 105 105 106 106 static void async_lcp_peek(struct asyncppp *ap, unsigned char *data, 107 107 int len, int inbound); ··· 179 179 ap->lcp_fcs = -1; 180 180 181 181 skb_queue_head_init(&ap->rqueue); 182 - tasklet_init(&ap->tsk, ppp_async_process, (unsigned long) ap); 182 + tasklet_setup(&ap->tsk, ppp_async_process); 183 183 184 184 refcount_set(&ap->refcnt, 1); 185 185 init_completion(&ap->dead); ··· 488 488 * to the ppp_generic code, and to tell the ppp_generic code 489 489 * if we can accept more output now. 490 490 */ 491 - static void ppp_async_process(unsigned long arg) 491 + static void ppp_async_process(struct tasklet_struct *t) 492 492 { 493 - struct asyncppp *ap = (struct asyncppp *) arg; 493 + struct asyncppp *ap = from_tasklet(ap, t, tsk); 494 494 struct sk_buff *skb; 495 495 496 496 /* process received packets */
+4 -4
drivers/net/ppp/ppp_synctty.c
··· 90 90 static int ppp_sync_send(struct ppp_channel *chan, struct sk_buff *skb); 91 91 static int ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, 92 92 unsigned long arg); 93 - static void ppp_sync_process(unsigned long arg); 93 + static void ppp_sync_process(struct tasklet_struct *t); 94 94 static int ppp_sync_push(struct syncppp *ap); 95 95 static void ppp_sync_flush_output(struct syncppp *ap); 96 96 static void ppp_sync_input(struct syncppp *ap, const unsigned char *buf, ··· 177 177 ap->raccm = ~0U; 178 178 179 179 skb_queue_head_init(&ap->rqueue); 180 - tasklet_init(&ap->tsk, ppp_sync_process, (unsigned long) ap); 180 + tasklet_setup(&ap->tsk, ppp_sync_process); 181 181 182 182 refcount_set(&ap->refcnt, 1); 183 183 init_completion(&ap->dead_cmp); ··· 480 480 * to the ppp_generic code, and to tell the ppp_generic code 481 481 * if we can accept more output now. 482 482 */ 483 - static void ppp_sync_process(unsigned long arg) 483 + static void ppp_sync_process(struct tasklet_struct *t) 484 484 { 485 - struct syncppp *ap = (struct syncppp *) arg; 485 + struct syncppp *ap = from_tasklet(ap, t, tsk); 486 486 struct sk_buff *skb; 487 487 488 488 /* process received packets */