net: smc91x: 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
271f278dfe
commit
7961fb1089
|
@ -535,10 +535,10 @@ static inline void smc_rcv(struct net_device *dev)
|
||||||
/*
|
/*
|
||||||
* This is called to actually send a packet to the chip.
|
* This is called to actually send a packet to the chip.
|
||||||
*/
|
*/
|
||||||
static void smc_hardware_send_pkt(unsigned long data)
|
static void smc_hardware_send_pkt(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct smc_local *lp = from_tasklet(lp, t, tx_task);
|
||||||
struct smc_local *lp = netdev_priv(dev);
|
struct net_device *dev = lp->dev;
|
||||||
void __iomem *ioaddr = lp->base;
|
void __iomem *ioaddr = lp->base;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
unsigned int packet_no, len;
|
unsigned int packet_no, len;
|
||||||
|
@ -688,7 +688,7 @@ smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
* Allocation succeeded: push packet to the chip's own memory
|
* Allocation succeeded: push packet to the chip's own memory
|
||||||
* immediately.
|
* immediately.
|
||||||
*/
|
*/
|
||||||
smc_hardware_send_pkt((unsigned long)dev);
|
smc_hardware_send_pkt(&lp->tx_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
|
@ -1964,7 +1964,7 @@ static int smc_probe(struct net_device *dev, void __iomem *ioaddr,
|
||||||
dev->netdev_ops = &smc_netdev_ops;
|
dev->netdev_ops = &smc_netdev_ops;
|
||||||
dev->ethtool_ops = &smc_ethtool_ops;
|
dev->ethtool_ops = &smc_ethtool_ops;
|
||||||
|
|
||||||
tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev);
|
tasklet_setup(&lp->tx_task, smc_hardware_send_pkt);
|
||||||
INIT_WORK(&lp->phy_configure, smc_phy_configure);
|
INIT_WORK(&lp->phy_configure, smc_phy_configure);
|
||||||
lp->dev = dev;
|
lp->dev = dev;
|
||||||
lp->mii.phy_id_mask = 0x1f;
|
lp->mii.phy_id_mask = 0x1f;
|
||||||
|
|
Loading…
Reference in a new issue