提交 0686e402 编写于 作者: J Jan Glauber 提交者: Martin Schwidefsky

[S390] qdio: remove the module_get & module_put pair

Increasing the qdio reference count for every used subchannel
is unnecessary since unloading qdio (if build as a module) is
only possible if other modules that use qdio are unloaded.
Unloading modules that use qdio in turn requires that these
modules shut down all qdio subchannels. Therefore the additional
module_get reference is not needed.
Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 58eb27cd
......@@ -1251,7 +1251,6 @@ int qdio_shutdown(struct ccw_device *cdev, int how)
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
mutex_unlock(&irq_ptr->setup_mutex);
module_put(THIS_MODULE);
if (rc)
return rc;
return 0;
......@@ -1399,9 +1398,6 @@ int qdio_establish(struct qdio_initialize *init_data)
if (cdev->private->state != DEV_STATE_ONLINE)
return -EINVAL;
if (!try_module_get(THIS_MODULE))
return -EINVAL;
mutex_lock(&irq_ptr->setup_mutex);
qdio_setup_irq(init_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册