Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a09ad3c462e802f0a522969ce377820cfad89ee8
Commit:     a09ad3c462e802f0a522969ce377820cfad89ee8
Parent:     bb125fb0e09c1b1e17d0b616f0e31fea937af9f6
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 25 16:59:13 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 16:29:59 2008 +1100

    [POWERPC] Create and hook up of_platform_device_shutdown
    
    Although of_platform_device's can have a shutdown routine, at the moment
    the bus code doesn't actually call it. So add the required glue to
    hook the shutdown routine.
    
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 drivers/of/platform.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index b47bb2d..ca09a63 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -85,6 +85,15 @@ static int of_platform_device_resume(struct device * dev)
        return error;
 }
 
+static void of_platform_device_shutdown(struct device *dev)
+{
+       struct of_device *of_dev = to_of_device(dev);
+       struct of_platform_driver *drv = to_of_platform_driver(dev->driver);
+
+       if (dev->driver && drv->shutdown)
+               drv->shutdown(of_dev);
+}
+
 int of_bus_type_init(struct bus_type *bus, const char *name)
 {
        bus->name = name;
@@ -93,6 +102,7 @@ int of_bus_type_init(struct bus_type *bus, const char *name)
        bus->remove = of_platform_device_remove;
        bus->suspend = of_platform_device_suspend;
        bus->resume = of_platform_device_resume;
+       bus->shutdown = of_platform_device_shutdown;
        return bus_register(bus);
 }
 
-
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