summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/css.c
diff options
context:
space:
mode:
authorCornelia Huck <huckc@de.ibm.com>2006-01-11 12:56:22 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 22:26:11 +0300
commit8bbace7e686f1536905c703038a7eddfb1520264 (patch)
tree99253fd56bebd7903ac8dd05ee7c236c765e2798 /drivers/s390/cio/css.c
parent348290a4ae143a692124330942b464ccdb0d0365 (diff)
downloadlinux-8bbace7e686f1536905c703038a7eddfb1520264.tar.xz
[PATCH] Add {css,ccw}_bus_type probe, remove, shutdown methods.
The following patch converts css_bus_type and ccw_bus_type to use the new bus_type methods. Signed-off-by: Cornelia Huck <huckc@de.ibm.com> CC: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r--drivers/s390/cio/css.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index e565193650c7..2d319fb812ca 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -542,9 +542,41 @@ css_bus_match (struct device *dev, struct device_driver *drv)
return 0;
}
+static int
+css_probe (struct device *dev)
+{
+ struct subchannel *sch;
+
+ sch = to_subchannel(dev);
+ sch->driver = container_of (dev->driver, struct css_driver, drv);
+ return (sch->driver->probe ? sch->driver->probe(sch) : 0);
+}
+
+static int
+css_remove (struct device *dev)
+{
+ struct subchannel *sch;
+
+ sch = to_subchannel(dev);
+ return (sch->driver->remove ? sch->driver->remove(sch) : 0);
+}
+
+static void
+css_shutdown (struct device *dev)
+{
+ struct subchannel *sch;
+
+ sch = to_subchannel(dev);
+ if (sch->driver->shutdown)
+ sch->driver->shutdown(sch);
+}
+
struct bus_type css_bus_type = {
- .name = "css",
- .match = &css_bus_match,
+ .name = "css",
+ .match = css_bus_match,
+ .probe = css_probe,
+ .remove = css_remove,
+ .shutdown = css_shutdown,
};
subsys_initcall(init_channel_subsystem);