Searched hist:"5 b5475826c5265cead7ce4ca6d34ec0c566c70aa" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/i2c/ |
H A D | i2c-core-base.c | diff 5b5475826c5265cead7ce4ca6d34ec0c566c70aa Sun Mar 21 20:38:32 CDT 2021 Dmitry Torokhov <dmitry.torokhov@gmail.com> i2c: ensure timely release of driver-allocated resources
More and more drivers rely on devres to manage their resources, however if bus' probe() and release() methods are not trivial and control some of resources as well (for example enable or disable clocks, or attach device to a power domain), we need to make sure that driver-allocated resources are released immediately after driver's remove() method returns, and not postponed until driver core gets around to releasing resources. To fix that we open a new devres group before calling driver's probe() and explicitly release it when we return from driver's remove().
Tested-by: Jeff LaBundy <jeff@labundy.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
|
/openbmc/linux/include/linux/ |
H A D | i2c.h | diff 5b5475826c5265cead7ce4ca6d34ec0c566c70aa Sun Mar 21 20:38:32 CDT 2021 Dmitry Torokhov <dmitry.torokhov@gmail.com> i2c: ensure timely release of driver-allocated resources
More and more drivers rely on devres to manage their resources, however if bus' probe() and release() methods are not trivial and control some of resources as well (for example enable or disable clocks, or attach device to a power domain), we need to make sure that driver-allocated resources are released immediately after driver's remove() method returns, and not postponed until driver core gets around to releasing resources. To fix that we open a new devres group before calling driver's probe() and explicitly release it when we return from driver's remove().
Tested-by: Jeff LaBundy <jeff@labundy.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
|