From 29bd6de18d2b24e3aa81891744446e2a3e375ec5 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Fri, 25 Jan 2008 16:59:13 +1100 Subject: [PATCH] --- yaml --- r: 83938 b: refs/heads/master c: a09ad3c462e802f0a522969ce377820cfad89ee8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/of/platform.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a3a597b4d1b4..8907365e7986 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bb125fb0e09c1b1e17d0b616f0e31fea937af9f6 +refs/heads/master: a09ad3c462e802f0a522969ce377820cfad89ee8 diff --git a/trunk/drivers/of/platform.c b/trunk/drivers/of/platform.c index b47bb2d7476a..ca09a63a64db 100644 --- a/trunk/drivers/of/platform.c +++ b/trunk/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); }