platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
Tzung-Bi Shih
maintainerPATCH 1/1 platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
The blocking notifier is registered in cros_ec_register(); however, it isn't unregistered in cros_ec_unregister().
Fix it.
---
This is separated from a series (https://lore.kernel.org/chrome-platform/[email protected]/).
While I'm still figuring out/testing the series, it'd be better to send the fix earlier (to catch up the upcoming merge window for example).
drivers/platform/chrome/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/chrome/cros_ec.c +3 -0
@@ -318,6 +318,9 @@ EXPORT_SYMBOL(cros_ec_register);*/ void cros_ec_unregister (struct cros_ec_device *ec_dev) { +if (ec_dev->mkbp_event_supported) +blocking_notifier_chain_unregister (&ec_dev->event_notifier, + &ec_dev->notifier_ready);platform_device_unregister (ec_dev->pd);platform_device_unregister (ec_dev->ec);mutex_destroy (&ec_dev->lock);
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
Quoted 8 lines · Tzung-Bi Shih
The blocking notifier is registered in
cros_ec_register(); however, it isn't unregistered incros_ec_unregister().Fix it.
Fixes 42cd0ab476e2 ("platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW")Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 26 lines
---
This is separated from a series (https://lore.kernel.org/chrome-platform/[email protected]/).While I'm still figuring out/testing the series, it'd be better to send the fix earlier (to catch up the upcoming merge window for example).
drivers/platform/chrome/cros_ec.c | 3 +++ 1 file changed, 3 insertions(+)drivers/platform/chrome/cros_ec.c +3
-0@@ -318,6 +318,9 @@ EXPORT_SYMBOL(cros_ec_register);*/ void cros_ec_unregister (struct cros_ec_device *ec_dev) { +if (ec_dev->mkbp_event_supported) +blocking_notifier_chain_unregister (&ec_dev->event_notifier, + &ec_dev->notifier_ready);platform_device_unregister (ec_dev->pd);platform_device_unregister (ec_dev->ec);mutex_destroy (&ec_dev->lock);Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
Tzung-Bi Shih
maintainerQuoted 4 lines · Tzung-Bi Shih
The blocking notifier is registered in
cros_ec_register(); however, it isn't unregistered incros_ec_unregister().Fix it.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
commit: e2374953461947eee49f69b3e3204ff080ef31b1
Thanks!