Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01bc8ad165490458a8feb744c8f401c1a7098e3a
Commit:     01bc8ad165490458a8feb744c8f401c1a7098e3a
Parent:     2fffc9355e6240466d1af764b0dcdede52085f7c
Author:     Cornelia Huck <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 5 16:50:36 2008 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 16:50:54 2008 +0100

    [S390] cio: Add shutdown callback for ccwgroup.
    
    This intendeds to make proper shutdown of qeth devices easier.
    
    Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 drivers/s390/cio/ccwgroup.c |   12 ++++++++++++
 include/asm-s390/ccwgroup.h |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index 3964056..03914fa 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -391,12 +391,24 @@ ccwgroup_remove (struct device *dev)
        return 0;
 }
 
+static void ccwgroup_shutdown(struct device *dev)
+{
+       struct ccwgroup_device *gdev;
+       struct ccwgroup_driver *gdrv;
+
+       gdev = to_ccwgroupdev(dev);
+       gdrv = to_ccwgroupdrv(dev->driver);
+       if (gdrv && gdrv->shutdown)
+               gdrv->shutdown(gdev);
+}
+
 static struct bus_type ccwgroup_bus_type = {
        .name   = "ccwgroup",
        .match  = ccwgroup_bus_match,
        .uevent = ccwgroup_uevent,
        .probe  = ccwgroup_probe,
        .remove = ccwgroup_remove,
+       .shutdown = ccwgroup_shutdown,
 };
 
 /**
diff --git a/include/asm-s390/ccwgroup.h b/include/asm-s390/ccwgroup.h
index 7109c7c..289053e 100644
--- a/include/asm-s390/ccwgroup.h
+++ b/include/asm-s390/ccwgroup.h
@@ -37,6 +37,7 @@ struct ccwgroup_device {
  * @remove: function called on remove
  * @set_online: function called when device is set online
  * @set_offline: function called when device is set offline
+ * @shutdown: function called when device is shut down
  * @driver: embedded driver structure
  */
 struct ccwgroup_driver {
@@ -49,6 +50,7 @@ struct ccwgroup_driver {
        void (*remove) (struct ccwgroup_device *);
        int (*set_online) (struct ccwgroup_device *);
        int (*set_offline) (struct ccwgroup_device *);
+       void (*shutdown)(struct ccwgroup_device *);
 
        struct device_driver driver;
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to