From 428b7f59835d3e62cf5a1920f3f753782ae84e5e Mon Sep 17 00:00:00 2001 From: Julian Wiedmann Date: Wed, 5 May 2021 10:25:14 +0200 Subject: [PATCH] s390/ccwgroup: simplify ungrouping when driver deregisters driver_unregister() ends up calling __device_release_driver() for each device that is bound to the driver. Thus ccwgroup_notifier() will see a BUS_NOTIFY_UNBIND_DRIVER event for these ccwgroup devices, and trigger the ungrouping. So there's no need to also trigger the ungrouping from within ccwgroup_driver_unregister(), remove it. Signed-off-by: Julian Wiedmann Reviewed-by: Vineeth Vijayan Signed-off-by: Vasily Gorbik --- drivers/s390/cio/ccwgroup.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 49f816c78873..7e5ceea62731 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -499,15 +499,6 @@ EXPORT_SYMBOL(ccwgroup_driver_register); */ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver) { - struct device *dev; - - /* We don't want ccwgroup devices to live longer than their driver. */ - while ((dev = driver_find_next_device(&cdriver->driver, NULL))) { - struct ccwgroup_device *gdev = to_ccwgroupdev(dev); - - ccwgroup_ungroup(gdev); - put_device(dev); - } driver_unregister(&cdriver->driver); } EXPORT_SYMBOL(ccwgroup_driver_unregister); -- 2.25.1