Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5b8e8ee6c65a34d8aafaeb8e2eaa97e496c2567c
Commit:     5b8e8ee6c65a34d8aafaeb8e2eaa97e496c2567c
Parent:     5e14ab8b5ecca8997406180e23761525f49a09a3
Author:     Geert Uytterhoeven <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 00:55:15 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 09:48:44 2007 -0800

    [PATCH] ps3: add shutdown to virtual uart port driver framework
    
    PS3: Add a shutdown method to the PS3's virtual uart port driver framework
    
    Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]>
    Signed-off-by: Geoff Levand <[EMAIL PROTECTED]>
    Cc: James Simmons <[EMAIL PROTECTED]>
    Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: Paul Mackerras <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/ps3/vuart.c |   17 +++++++++++++++++
 drivers/ps3/vuart.h |    1 +
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/ps3/vuart.c b/drivers/ps3/vuart.c
index a72da8f..ef8fd4c 100644
--- a/drivers/ps3/vuart.c
+++ b/drivers/ps3/vuart.c
@@ -867,6 +867,22 @@ static int ps3_vuart_remove(struct device *_dev)
        return 0;
 }
 
+static void ps3_vuart_shutdown(struct device *_dev)
+{
+       struct ps3_vuart_port_device *dev = to_ps3_vuart_port_device(_dev);
+       struct ps3_vuart_port_driver *drv =
+               to_ps3_vuart_port_driver(_dev->driver);
+
+       dev_dbg(&dev->core, "%s:%d: %s\n", __func__, __LINE__,
+               dev->core.bus_id);
+
+       if (drv->shutdown)
+               drv->shutdown(dev);
+       else
+               dev_dbg(&dev->core, "%s:%d: %s no shutdown method\n", __func__,
+                       __LINE__, dev->core.bus_id);
+}
+
 /**
  * ps3_vuart - The vuart instance.
  *
@@ -878,6 +894,7 @@ struct bus_type ps3_vuart = {
        .match = ps3_vuart_match,
        .probe = ps3_vuart_probe,
        .remove = ps3_vuart_remove,
+       .shutdown = ps3_vuart_shutdown,
 };
 
 int __init ps3_vuart_init(void)
diff --git a/drivers/ps3/vuart.h b/drivers/ps3/vuart.h
index 11c421c..2cbf728 100644
--- a/drivers/ps3/vuart.h
+++ b/drivers/ps3/vuart.h
@@ -30,6 +30,7 @@ struct ps3_vuart_port_driver {
        struct device_driver core;
        int (*probe)(struct ps3_vuart_port_device *);
        int (*remove)(struct ps3_vuart_port_device *);
+       void (*shutdown)(struct ps3_vuart_port_device *);
        int (*tx_event)(struct ps3_vuart_port_device *dev);
        int (*rx_event)(struct ps3_vuart_port_device *dev);
        int (*disconnect_event)(struct ps3_vuart_port_device *dev);
-
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