diff options
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index ceeb3cf64a16..3e39508bd929 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1952,26 +1952,24 @@ dasd_generic_notify(struct ccw_device *cdev, int event) | |||
1952 | * Automatically online either all dasd devices (dasd_autodetect) or | 1952 | * Automatically online either all dasd devices (dasd_autodetect) or |
1953 | * all devices specified with dasd= parameters. | 1953 | * all devices specified with dasd= parameters. |
1954 | */ | 1954 | */ |
1955 | static int | ||
1956 | __dasd_auto_online(struct device *dev, void *data) | ||
1957 | { | ||
1958 | struct ccw_device *cdev; | ||
1959 | |||
1960 | cdev = to_ccwdev(dev); | ||
1961 | if (dasd_autodetect || dasd_busid_known(cdev->dev.bus_id) == 0) | ||
1962 | ccw_device_set_online(cdev); | ||
1963 | return 0; | ||
1964 | } | ||
1965 | |||
1955 | void | 1966 | void |
1956 | dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) | 1967 | dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) |
1957 | { | 1968 | { |
1958 | struct device_driver *drv; | 1969 | struct device_driver *drv; |
1959 | struct device *d, *dev; | ||
1960 | struct ccw_device *cdev; | ||
1961 | 1970 | ||
1962 | drv = get_driver(&dasd_discipline_driver->driver); | 1971 | drv = get_driver(&dasd_discipline_driver->driver); |
1963 | down_read(&drv->bus->subsys.rwsem); | 1972 | driver_for_each_device(drv, NULL, NULL, __dasd_auto_online); |
1964 | dev = NULL; | ||
1965 | list_for_each_entry(d, &drv->devices, driver_list) { | ||
1966 | dev = get_device(d); | ||
1967 | if (!dev) | ||
1968 | continue; | ||
1969 | cdev = to_ccwdev(dev); | ||
1970 | if (dasd_autodetect || dasd_busid_known(cdev->dev.bus_id) == 0) | ||
1971 | ccw_device_set_online(cdev); | ||
1972 | put_device(dev); | ||
1973 | } | ||
1974 | up_read(&drv->bus->subsys.rwsem); | ||
1975 | put_driver(drv); | 1973 | put_driver(drv); |
1976 | } | 1974 | } |
1977 | 1975 | ||