aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorCornelia Huck <cohuck@de.ibm.com>2005-06-25 17:55:28 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:36 -0400
commitc551288e34cff0a78b3103ce2e12099dffa41071 (patch)
tree68e6c3a17c89c00d115e36fbdee73df8f9339274 /drivers/s390
parentb0744bd2925a4a24865963322534107d2ad553f9 (diff)
[PATCH] s/390: use klist in dasd driver
Convert the dasd driver to use the new klist interface. Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Cc: Greg KH <greg@kroah.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd.c26
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 */
1955static 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
1955void 1966void
1956dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) 1967dasd_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