From 595094f5c213fa301b0304c1e0732811740b4db6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 3 Sep 2024 10:11:26 +0200 Subject: [PATCH] device: do not pull device present state from hotplug events Use hotplug events as trigger for system_if_check instead. Fixes a race condition in event processing Signed-off-by: Felix Fietkau --- device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.c b/device.c index 32e42a6..8513f72 100644 --- a/device.c +++ b/device.c @@ -1472,5 +1472,5 @@ void device_hotplug_event(const char *name, bool add) if (!dev || dev->type != &simple_device_type) return; - device_set_present(dev, add); + system_if_check(dev); } -- 2.30.2