From f45926c38e91e64bb7873fc6d54cd2775bcab077 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 9 Sep 2024 14:53:14 +0200 Subject: [PATCH] spa: v4l2: Remove start_inotify() call from impl_on_fd_events() The spa_loop_add_source() call for udev event monitoring which uses impl_on_fd_events() is done from start_monitor() which also unconditionally calls start_inotify(). Since start_monitor() already always calls start_inotify() there is no scenario where start_inotify() has not been called yet when impl_on_fd_events() gets called. So the start_inotify() call in impl_on_fd_events() is redundant, remove it. Signed-off-by: Hans de Goede (cherry picked from commit ab245947e540bbcbd040b83af5081f53dd70da7b) --- spa/plugins/v4l2/v4l2-udev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/spa/plugins/v4l2/v4l2-udev.c b/spa/plugins/v4l2/v4l2-udev.c index 7118b6239..1f903047e 100644 --- a/spa/plugins/v4l2/v4l2-udev.c +++ b/spa/plugins/v4l2/v4l2-udev.c @@ -495,8 +495,6 @@ static void impl_on_fd_events(struct spa_source *source) spa_log_debug(this->log, "action %s", action); - start_inotify(this); - if (spa_streq(action, "add") || spa_streq(action, "change")) { process_udev_device(this, ACTION_CHANGE, dev);