aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/ccwgroup.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2014-06-13 12:11:37 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-06-16 04:32:52 -0400
commitfa73eb4738fc75317a481aa95cd472d0d6d057c3 (patch)
tree37e2cb9015ba411d299f9c4567e35860edcd53eb /drivers/s390/cio/ccwgroup.c
parent0310c8b582d70e2d5070600f7b2c93a22dc4e7e0 (diff)
s390/ccwgroup: use ccwgroup_ungroup wrapper
To ungroup and deregister the group device always use the ccwgroup_ungroup wrapper. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/ccwgroup.c')
-rw-r--r--drivers/s390/cio/ccwgroup.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index 4ec19870447e..e443b0d0b236 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -586,11 +586,7 @@ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver)
586 __ccwgroup_match_all))) { 586 __ccwgroup_match_all))) {
587 struct ccwgroup_device *gdev = to_ccwgroupdev(dev); 587 struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
588 588
589 mutex_lock(&gdev->reg_mutex); 589 ccwgroup_ungroup(gdev);
590 __ccwgroup_remove_symlinks(gdev);
591 device_unregister(dev);
592 __ccwgroup_remove_cdev_refs(gdev);
593 mutex_unlock(&gdev->reg_mutex);
594 put_device(dev); 590 put_device(dev);
595 } 591 }
596 driver_unregister(&cdriver->driver); 592 driver_unregister(&cdriver->driver);
@@ -637,13 +633,7 @@ void ccwgroup_remove_ccwdev(struct ccw_device *cdev)
637 get_device(&gdev->dev); 633 get_device(&gdev->dev);
638 spin_unlock_irq(cdev->ccwlock); 634 spin_unlock_irq(cdev->ccwlock);
639 /* Unregister group device. */ 635 /* Unregister group device. */
640 mutex_lock(&gdev->reg_mutex); 636 ccwgroup_ungroup(gdev);
641 if (device_is_registered(&gdev->dev)) {
642 __ccwgroup_remove_symlinks(gdev);
643 device_unregister(&gdev->dev);
644 __ccwgroup_remove_cdev_refs(gdev);
645 }
646 mutex_unlock(&gdev->reg_mutex);
647 /* Release ccwgroup device reference for local processing. */ 637 /* Release ccwgroup device reference for local processing. */
648 put_device(&gdev->dev); 638 put_device(&gdev->dev);
649} 639}