diff mbox series

[meta-arago,master/dunfell,2/2] udev: fix the local rule to load modules when new hardware is added

Message ID 20230104141150.186773-3-j-choudhary@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series Fix module loading udev rules | expand

Commit Message

Jayesh Choudhary Jan. 4, 2023, 2:11 p.m. UTC
Using modprobe causes the rule to fail when the module is builtin in kernel
and it is logged in journalctl. So use the builtin command 'kmod' instead.
This makes the journalctl logs clean and significantly easier to read.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
 meta-arago-distro/recipes-core/udev/eudev/local.rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-arago-distro/recipes-core/udev/eudev/local.rules b/meta-arago-distro/recipes-core/udev/eudev/local.rules
index 689e093c..f14352d5 100644
--- a/meta-arago-distro/recipes-core/udev/eudev/local.rules
+++ b/meta-arago-distro/recipes-core/udev/eudev/local.rules
@@ -14,7 +14,7 @@ 
 #
 
 # Try and modprobe for drivers for new hardware
-ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
+ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"
 
 # Create a symlink to any touchscreen input device
 SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0"