Skip to content

Commit

Permalink
[S390] qdio: remove the module_get & module_put pair
Browse files Browse the repository at this point in the history
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: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Aug 21, 2008
1 parent 58eb27c commit 0686e40
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 0686e40

Please sign in to comment.