[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=XW5rodt0LdmzVwnzUgBgxe98zh1PshHa1G5=oUcg6aAA@mail.gmail.com>
Date: Fri, 22 Jan 2021 14:46:42 -0800
From: Doug Anderson <dianders@...omium.org>
To: Daisuke Nojiri <dnojiri@...omium.org>
Cc: Vincent Palatin <vpalatin@...omium.org>,
Lee Jones <lee.jones@...aro.org>,
Benson Leung <bleung@...omium.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Guenter Roeck <groeck@...omium.org>,
Sebastian Reichel <sre@...nel.org>,
Prashant Malani <pmalani@...omium.org>,
Mark Brown <broonie@...nel.org>,
Pi-Hsun Shih <pihsun@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>,
Yu-Hsuan Hsu <yuhsuan@...omium.org>,
Ching-Kang Yen <chingkang@...omium.org>,
Vijay Hiremath <vijay.p.hiremath@...el.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] power: supply: PCHG: Peripheral device charger
Hi,
On Fri, Jan 22, 2021 at 2:07 PM Daisuke Nojiri <dnojiri@...omium.org> wrote:
>
> +static int cros_ec_notify(struct notifier_block *nb,
> + unsigned long queued_during_suspend,
> + void *data)
> +{
> + struct cros_ec_device *ec_dev = (struct cros_ec_device *)data;
> + u32 host_event = cros_ec_get_host_event(ec_dev);
> + struct charger_data *charger =
> + container_of(nb, struct charger_data, notifier);
> + u32 device_event_mask;
> +
> + if (!host_event)
> + return NOTIFY_BAD;
Drive-by bug report: the above should be NOTIFY_DONE. By returning
NOTIFY_BAD you're preventing other people on the call chain that come
after you from receiving any events that aren't "host events".
Specifically this includes keyboard events, switch events, etc.
The patch <https://crrev.com/c/2645556> contains the fix.
-Doug
Powered by blists - more mailing lists