Skip to content

Commit

Permalink
net: natsemi: convert tasklets to use new tasklet_setup() API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allen Pais authored and David S. Miller committed Sep 14, 2020
1 parent 9ad5a25 commit 54e977f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/natsemi/ns83820.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,10 @@ static void rx_irq(struct net_device *ndev)
spin_unlock_irqrestore(&info->lock, flags);
}

static void rx_action(unsigned long _dev)
static void rx_action(struct tasklet_struct *t)
{
struct net_device *ndev = (void *)_dev;
struct ns83820 *dev = PRIV(ndev);
struct ns83820 *dev = from_tasklet(dev, t, rx_tasklet);
struct net_device *ndev = dev->ndev;
rx_irq(ndev);
writel(ihr, dev->base + IHR);

Expand Down Expand Up @@ -1924,7 +1924,7 @@ static int ns83820_init_one(struct pci_dev *pci_dev,
SET_NETDEV_DEV(ndev, &pci_dev->dev);

INIT_WORK(&dev->tq_refill, queue_refill);
tasklet_init(&dev->rx_tasklet, rx_action, (unsigned long)ndev);
tasklet_setup(&dev->rx_tasklet, rx_action);

err = pci_enable_device(pci_dev);
if (err) {
Expand Down

0 comments on commit 54e977f

Please sign in to comment.