diff options
author | Allen Pais <apais@linux.microsoft.com> | 2020-09-14 09:29:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-14 22:02:37 +0200 |
commit | 9c59cc79d675fad8b1b4e5f8e75eeaaab78b11ef (patch) | |
tree | 3bf4a19cd3c1f5ab9b9c27265237e7e337447414 /drivers/net/ethernet/alteon/acenic.c | |
parent | tulip: switch from 'pci_' to 'dma_' API (diff) | |
download | linux-9c59cc79d675fad8b1b4e5f8e75eeaaab78b11ef.tar.xz linux-9c59cc79d675fad8b1b4e5f8e75eeaaab78b11ef.zip |
net: alteon: 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.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/alteon/acenic.c')
-rw-r--r-- | drivers/net/ethernet/alteon/acenic.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c index 8470c836fa18..1a7e4df9b3e9 100644 --- a/drivers/net/ethernet/alteon/acenic.c +++ b/drivers/net/ethernet/alteon/acenic.c @@ -465,6 +465,7 @@ static int acenic_probe_one(struct pci_dev *pdev, SET_NETDEV_DEV(dev, &pdev->dev); ap = netdev_priv(dev); + ap->ndev = dev; ap->pdev = pdev; ap->name = pci_name(pdev); @@ -1562,10 +1563,10 @@ static void ace_watchdog(struct net_device *data, unsigned int txqueue) } -static void ace_tasklet(unsigned long arg) +static void ace_tasklet(struct tasklet_struct *t) { - struct net_device *dev = (struct net_device *) arg; - struct ace_private *ap = netdev_priv(dev); + struct ace_private *ap = from_tasklet(ap, t, ace_tasklet); + struct net_device *dev = ap->ndev; int cur_size; cur_size = atomic_read(&ap->cur_rx_bufs); @@ -2269,7 +2270,7 @@ static int ace_open(struct net_device *dev) /* * Setup the bottom half rx ring refill handler */ - tasklet_init(&ap->ace_tasklet, ace_tasklet, (unsigned long)dev); + tasklet_setup(&ap->ace_tasklet, ace_tasklet); return 0; } |