From: Benson Leung <bleung@google.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: bleung@chromium.org, gregkh@linuxfoundation.org,
chrome-platform@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister()
Date: Tue, 22 Jul 2025 18:23:25 +0000 [thread overview]
Message-ID: <aH_XHRbzx-sLcS7X@google.com> (raw)
In-Reply-To: <20250722120513.234031-1-tzungbi@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]
On Tue, Jul 22, 2025 at 12:05:13PM +0000, Tzung-Bi Shih wrote:
> The blocking notifier is registered in cros_ec_register(); however, it
> isn't unregistered in cros_ec_unregister().
>
> Fix it.
>
> Fixes: 42cd0ab476e2 ("platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW")
> Cc: stable@vger.kernel.org
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
> ---
> This is separated from a series (https://lore.kernel.org/chrome-platform/20250721044456.2736300-3-tzungbi@kernel.org/).
>
> 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(+)
>
> diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
> index 110771a8645e..fd58781a2fb7 100644
> --- a/drivers/platform/chrome/cros_ec.c
> +++ b/drivers/platform/chrome/cros_ec.c
> @@ -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);
> --
> 2.50.0.727.gbf7dc18ff4-goog
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-07-22 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 12:05 [PATCH] platform/chrome: cros_ec: Unregister notifier in cros_ec_unregister() Tzung-Bi Shih
2025-07-22 18:23 ` Benson Leung [this message]
2025-07-23 3:22 ` Tzung-Bi Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aH_XHRbzx-sLcS7X@google.com \
--to=bleung@google.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=tzungbi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.