提交 f5c35cc1 编写于 作者: T Tejun Heo

ehea: don't use flush_scheduled_work()

Directly cancel port->reset_task from ehea_shutdown_single_port()
instead.  As this cancels the work for each port on driver detach,
flushing system_wq from ehea_remove() or ehea_module_exit() is no
longer necessary.
Signed-off-by: NTejun Heo <tj@kernel.org>
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
上级 3d6b892b
...@@ -3318,6 +3318,8 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, ...@@ -3318,6 +3318,8 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
static void ehea_shutdown_single_port(struct ehea_port *port) static void ehea_shutdown_single_port(struct ehea_port *port)
{ {
struct ehea_adapter *adapter = port->adapter; struct ehea_adapter *adapter = port->adapter;
cancel_work_sync(&port->reset_task);
unregister_netdev(port->netdev); unregister_netdev(port->netdev);
ehea_unregister_port(port); ehea_unregister_port(port);
kfree(port->mc_list); kfree(port->mc_list);
...@@ -3607,8 +3609,6 @@ static int __devexit ehea_remove(struct platform_device *dev) ...@@ -3607,8 +3609,6 @@ static int __devexit ehea_remove(struct platform_device *dev)
ehea_remove_device_sysfs(dev); ehea_remove_device_sysfs(dev);
flush_scheduled_work();
ibmebus_free_irq(adapter->neq->attr.ist1, adapter); ibmebus_free_irq(adapter->neq->attr.ist1, adapter);
tasklet_kill(&adapter->neq_tasklet); tasklet_kill(&adapter->neq_tasklet);
...@@ -3797,7 +3797,6 @@ static void __exit ehea_module_exit(void) ...@@ -3797,7 +3797,6 @@ static void __exit ehea_module_exit(void)
{ {
int ret; int ret;
flush_scheduled_work();
driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities); driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities);
ibmebus_unregister_driver(&ehea_driver); ibmebus_unregister_driver(&ehea_driver);
unregister_reboot_notifier(&ehea_reboot_nb); unregister_reboot_notifier(&ehea_reboot_nb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册