ks8851_unlock(ks, &flags);
}
+/**
+ * ks8851_flush_tx_work - flush outstanding TX work
+ * @ks: The device state
+ */
+static void ks8851_flush_tx_work(struct ks8851_net *ks)
+{
+ struct ks8851_net_spi *kss = to_ks8851_spi(ks);
+
+ flush_work(&kss->tx_work);
+}
+
/**
* ks8851_net_open - open network device
* @dev: The network device being opened.
static int ks8851_net_stop(struct net_device *dev)
{
struct ks8851_net *ks = netdev_priv(dev);
- struct ks8851_net_spi *kss;
unsigned long flags;
- kss = to_ks8851_spi(ks);
-
netif_info(ks, ifdown, dev, "shutting down\n");
netif_stop_queue(dev);
ks8851_unlock(ks, &flags);
/* stop any outstanding work */
- flush_work(&kss->tx_work);
+ ks8851_flush_tx_work(ks);
flush_work(&ks->rxctrl_work);
ks8851_lock(ks, &flags);