Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e07ebd8 authored by Tejun Heo's avatar Tejun Heo
Browse files

drivers/net: remove unnecessary flush_scheduled_work() calls



janz-ican3, sh_eth, skge and vxge don't use workqueue at all and there
is no reason to flush the system_wq.  Drop flush_scheduled_work()
calls and references to workqueue.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Cc: Sivakumar Subramani <sivakumar.subramani@exar.com>
Cc: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Cc: Jon Mason <jon.mason@exar.com>
Cc: netdev@vger.kernel.org
parent ad1184c6
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -1114,11 +1114,6 @@ static bool ican3_txok(struct ican3_dev *mod)
/*
/*
 * Recieve one CAN frame from the hardware
 * Recieve one CAN frame from the hardware
 *
 *
 * This works like the core of a NAPI function, but is intended to be called
 * from workqueue context instead. This driver already needs a workqueue to
 * process control messages, so we use the workqueue instead of using NAPI.
 * This was done to simplify locking.
 *
 * CONTEXT: must be called from user context
 * CONTEXT: must be called from user context
 */
 */
static int ican3_recv_skb(struct ican3_dev *mod)
static int ican3_recv_skb(struct ican3_dev *mod)
@@ -1251,7 +1246,6 @@ static irqreturn_t ican3_irq(int irq, void *dev_id)
 * Reset an ICAN module to its power-on state
 * Reset an ICAN module to its power-on state
 *
 *
 * CONTEXT: no network device registered
 * CONTEXT: no network device registered
 * LOCKING: work function disabled
 */
 */
static int ican3_reset_module(struct ican3_dev *mod)
static int ican3_reset_module(struct ican3_dev *mod)
{
{
@@ -1262,9 +1256,6 @@ static int ican3_reset_module(struct ican3_dev *mod)
	/* disable interrupts so no more work is scheduled */
	/* disable interrupts so no more work is scheduled */
	iowrite8(1 << mod->num, &mod->ctrl->int_disable);
	iowrite8(1 << mod->num, &mod->ctrl->int_disable);


	/* flush any pending work */
	flush_scheduled_work();

	/* the first unallocated page in the DPM is #9 */
	/* the first unallocated page in the DPM is #9 */
	mod->free_page = DPM_FREE_START;
	mod->free_page = DPM_FREE_START;


+0 −1
Original line number Original line Diff line number Diff line
@@ -1552,7 +1552,6 @@ static int sh_eth_drv_remove(struct platform_device *pdev)


	sh_mdio_release(ndev);
	sh_mdio_release(ndev);
	unregister_netdev(ndev);
	unregister_netdev(ndev);
	flush_scheduled_work();
	pm_runtime_disable(&pdev->dev);
	pm_runtime_disable(&pdev->dev);
	free_netdev(ndev);
	free_netdev(ndev);
	platform_set_drvdata(pdev, NULL);
	platform_set_drvdata(pdev, NULL);
+0 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,6 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
#include <linux/phy.h>


+0 −2
Original line number Original line Diff line number Diff line
@@ -4012,8 +4012,6 @@ static void __devexit skge_remove(struct pci_dev *pdev)
	if (!hw)
	if (!hw)
		return;
		return;


	flush_scheduled_work();

	dev1 = hw->dev[1];
	dev1 = hw->dev[1];
	if (dev1)
	if (dev1)
		unregister_netdev(dev1);
		unregister_netdev(dev1);
+0 −2
Original line number Original line Diff line number Diff line
@@ -3439,8 +3439,6 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)


	strncpy(buf, dev->name, IFNAMSIZ);
	strncpy(buf, dev->name, IFNAMSIZ);


	flush_scheduled_work();

	/* in 2.6 will call stop() if device is up */
	/* in 2.6 will call stop() if device is up */
	unregister_netdev(dev);
	unregister_netdev(dev);