Commit a5b88632 authored by Emil Renner Berthing's avatar Emil Renner Berthing Committed by Jakub Kicinski

net: atm: pppoatm: use tasklet_init to initialize wakeup tasklet

Previously a temporary tasklet structure was initialized on the stack
using DECLARE_TASKLET_OLD() and then copied over and modified. Nothing
else in the kernel seems to use this pattern, so let's just call
tasklet_init() like everyone else.
Signed-off-by: default avatarEmil Renner Berthing <kernel@esmil.dk>
Link: https://lore.kernel.org/r/20210127173256.13954-1-kernel@esmil.dkSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 810e754c
...@@ -389,11 +389,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg) ...@@ -389,11 +389,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)
struct atm_backend_ppp be; struct atm_backend_ppp be;
struct pppoatm_vcc *pvcc; struct pppoatm_vcc *pvcc;
int err; int err;
/*
* Each PPPoATM instance has its own tasklet - this is just a
* prototypical one used to initialize them
*/
static const DECLARE_TASKLET_OLD(tasklet_proto, pppoatm_wakeup_sender);
if (copy_from_user(&be, arg, sizeof be)) if (copy_from_user(&be, arg, sizeof be))
return -EFAULT; return -EFAULT;
if (be.encaps != PPPOATM_ENCAPS_AUTODETECT && if (be.encaps != PPPOATM_ENCAPS_AUTODETECT &&
...@@ -415,8 +411,8 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg) ...@@ -415,8 +411,8 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)
pvcc->chan.ops = &pppoatm_ops; pvcc->chan.ops = &pppoatm_ops;
pvcc->chan.mtu = atmvcc->qos.txtp.max_sdu - PPP_HDRLEN - pvcc->chan.mtu = atmvcc->qos.txtp.max_sdu - PPP_HDRLEN -
(be.encaps == e_vc ? 0 : LLC_LEN); (be.encaps == e_vc ? 0 : LLC_LEN);
pvcc->wakeup_tasklet = tasklet_proto; tasklet_init(&pvcc->wakeup_tasklet, pppoatm_wakeup_sender,
pvcc->wakeup_tasklet.data = (unsigned long) &pvcc->chan; (unsigned long)&pvcc->chan);
err = ppp_register_channel(&pvcc->chan); err = ppp_register_channel(&pvcc->chan);
if (err != 0) { if (err != 0) {
kfree(pvcc); kfree(pvcc);
......
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