mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
net: silan: 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>
This commit is contained in:
parent
b5f0a3bfc1
commit
271f278dfe
@ -301,6 +301,7 @@ struct sc92031_priv {
|
|||||||
|
|
||||||
/* for dev->get_stats */
|
/* for dev->get_stats */
|
||||||
long rx_value;
|
long rx_value;
|
||||||
|
struct net_device *ndev;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* I don't know which registers can be safely read; however, I can guess
|
/* I don't know which registers can be safely read; however, I can guess
|
||||||
@ -829,10 +830,10 @@ static void _sc92031_link_tasklet(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sc92031_tasklet(unsigned long data)
|
static void sc92031_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct sc92031_priv *priv = from_tasklet(priv, t, tasklet);
|
||||||
struct sc92031_priv *priv = netdev_priv(dev);
|
struct net_device *dev = priv->ndev;
|
||||||
void __iomem *port_base = priv->port_base;
|
void __iomem *port_base = priv->port_base;
|
||||||
u32 intr_status, intr_mask;
|
u32 intr_status, intr_mask;
|
||||||
|
|
||||||
@ -1108,7 +1109,7 @@ static void sc92031_poll_controller(struct net_device *dev)
|
|||||||
|
|
||||||
disable_irq(irq);
|
disable_irq(irq);
|
||||||
if (sc92031_interrupt(irq, dev) != IRQ_NONE)
|
if (sc92031_interrupt(irq, dev) != IRQ_NONE)
|
||||||
sc92031_tasklet((unsigned long)dev);
|
sc92031_tasklet(&priv->tasklet);
|
||||||
enable_irq(irq);
|
enable_irq(irq);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1443,10 +1444,11 @@ static int sc92031_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||||||
dev->ethtool_ops = &sc92031_ethtool_ops;
|
dev->ethtool_ops = &sc92031_ethtool_ops;
|
||||||
|
|
||||||
priv = netdev_priv(dev);
|
priv = netdev_priv(dev);
|
||||||
|
priv->ndev = dev;
|
||||||
spin_lock_init(&priv->lock);
|
spin_lock_init(&priv->lock);
|
||||||
priv->port_base = port_base;
|
priv->port_base = port_base;
|
||||||
priv->pdev = pdev;
|
priv->pdev = pdev;
|
||||||
tasklet_init(&priv->tasklet, sc92031_tasklet, (unsigned long)dev);
|
tasklet_setup(&priv->tasklet, sc92031_tasklet);
|
||||||
/* Fudge tasklet count so the call to sc92031_enable_interrupts at
|
/* Fudge tasklet count so the call to sc92031_enable_interrupts at
|
||||||
* sc92031_open will work correctly */
|
* sc92031_open will work correctly */
|
||||||
tasklet_disable_nosync(&priv->tasklet);
|
tasklet_disable_nosync(&priv->tasklet);
|
||||||
|
Loading…
Reference in New Issue
Block a user