]> 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)
commit52229b3b023c66b7b0e527f3a756074ab3057e18
treea3fce0301729ed7d49dea39a6a85a846dd0e77e6
parent2e4c55360084fb14fffcc3269115c93e5af22ea1
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