From 579eb31222288f256c404648644a2c43b01d73fa Mon Sep 17 00:00:00 2001 From: Ivaylo Dimitrov Date: Sun, 12 Jan 2025 18:54:22 +0200 Subject: [PATCH] linux: Fix BUS_PLATFORM detection for non-PCI devices Commit 74b7427c41b4 (linux: Make platform device probe less fragile) effectively dropped busid detection for non-PCI devices, for example on OMAP we have "ID_PATH=platform-omapdrm.0". For such devices busid will not be set, making platform probes (and server mediated fd support) impossible. Fix that by extending config_udev_odev_setup_attribs() logic to support platform devices as well. Signed-off-by: Ivaylo Dimitrov Part-of: --- config/udev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/udev.c b/config/udev.c index 83226638d..be317ee99 100644 --- a/config/udev.c +++ b/config/udev.c @@ -551,6 +551,9 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path attribs->busid = XNFstrdup(value); attribs->busid[3] = ':'; + } else if (value && (str = strrstr(value, "platform-"))) { + value = str + 9; + attribs->busid = XNFstrdup(value); } if (!value)