Commit fa73eb47 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky

s390/ccwgroup: use ccwgroup_ungroup wrapper

To ungroup and deregister the group device always use the
ccwgroup_ungroup wrapper.
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 0310c8b5
...@@ -586,11 +586,7 @@ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver) ...@@ -586,11 +586,7 @@ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver)
__ccwgroup_match_all))) { __ccwgroup_match_all))) {
struct ccwgroup_device *gdev = to_ccwgroupdev(dev); struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
mutex_lock(&gdev->reg_mutex); ccwgroup_ungroup(gdev);
__ccwgroup_remove_symlinks(gdev);
device_unregister(dev);
__ccwgroup_remove_cdev_refs(gdev);
mutex_unlock(&gdev->reg_mutex);
put_device(dev); put_device(dev);
} }
driver_unregister(&cdriver->driver); driver_unregister(&cdriver->driver);
...@@ -637,13 +633,7 @@ void ccwgroup_remove_ccwdev(struct ccw_device *cdev) ...@@ -637,13 +633,7 @@ void ccwgroup_remove_ccwdev(struct ccw_device *cdev)
get_device(&gdev->dev); get_device(&gdev->dev);
spin_unlock_irq(cdev->ccwlock); spin_unlock_irq(cdev->ccwlock);
/* Unregister group device. */ /* Unregister group device. */
mutex_lock(&gdev->reg_mutex); ccwgroup_ungroup(gdev);
if (device_is_registered(&gdev->dev)) {
__ccwgroup_remove_symlinks(gdev);
device_unregister(&gdev->dev);
__ccwgroup_remove_cdev_refs(gdev);
}
mutex_unlock(&gdev->reg_mutex);
/* Release ccwgroup device reference for local processing. */ /* Release ccwgroup device reference for local processing. */
put_device(&gdev->dev); put_device(&gdev->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment