X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fof%2Fplatform.c;h=ca09a63a64db7bdf66a03f0da0069518615e3d6f;hb=37d7035da5b1f184c610b038b376c0c647d8d72b;hp=b47bb2d7476a82e5618fc50c0772cfea9ddd46ec;hpb=ab08ed1770140ebcf1be1657087689832b755874;p=linux-2.6 diff --git a/drivers/of/platform.c b/drivers/of/platform.c index b47bb2d747..ca09a63a64 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); }