]> www.infradead.org Git - users/willy/xarray.git/commit
power: supply: cros_charge-control: add mutex for driver data
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 8 Dec 2024 14:59:26 +0000 (15:59 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 10 Dec 2024 01:51:45 +0000 (02:51 +0100)
commite5f84d1cf562f7b45e28d6e5f6490626f870f81c
tree01946a86580ba0dc377e4a661cd9a096114982eb
parentafc6e39e824ad0e44b2af50a97885caec8d213d1
power: supply: cros_charge-control: add mutex for driver data

Concurrent accesses through sysfs may lead to inconsistent state in the
priv data. Introduce a mutex to avoid this.

Fixes: c6ed48ef5259 ("power: supply: add ChromeOS EC based charge control driver")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241208-cros_charge-control-v2-v1-1-8d168d0f08a3@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cros_charge-control.c