]> git.baikalelectronics.ru Git - kernel.git/commit
base/platform: assert that dev_pm_domain callbacks are called unconditionally
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 7 Aug 2015 05:19:22 +0000 (07:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 18:42:22 +0000 (19:42 +0100)
commit0cf72c42601b5ef31f2ef02d2847093bb9666c9b
treea3fce0301729ed7d49dea39a6a85a846dd0e77e6
parentc5f3509c7433348fdd46e9e0c2c3f31fb88f8321
base/platform: assert that dev_pm_domain callbacks are called unconditionally

When a platform driver doesn't provide a .remove callback the function
platform_drv_remove isn't called and so the call to dev_pm_domain_attach
called at probe time isn't paired by dev_pm_domain_detach at remove
time.

To fix this (and similar issues if different callbacks are missing) hook
up the driver callbacks unconditionally and make them aware that the
platform callbacks might be missing.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c