1
for input devices we handle change like remove/add, but for
2
drm devices we get change events when we hotplug outputs,
3
so lets just ignore change at this level, and let the drivers
4
handle it. We may in the future want to route driver udev
7
Reported-by: Timo Aaltonen <timo.aaltonen@canonical.com>
8
Signed-off-by: Dave Airlie <airlied@redhat.com>
10
config/udev.c | 8 +++++++-
11
1 file changed, 7 insertions(+), 1 deletion(-)
13
diff --git a/config/udev.c b/config/udev.c
14
index 03aca28..4a77983 100644
17
@@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
19
action = udev_device_get_action(udev_device);
21
- if (!strcmp(action, "add") || !strcmp(action, "change")) {
22
+ if (!strcmp(action, "add")) {
23
device_removed(udev_device);
24
device_added(udev_device);
25
+ } else if (!strcmp(action, "change")) {
26
+ /* ignore change for the drm devices */
27
+ if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
28
+ device_removed(udev_device);
29
+ device_added(udev_device);
32
else if (!strcmp(action, "remove"))
33
device_removed(udev_device);