linux: Fix platform device probe for DT-based PCI

On a DT-base PCI platform, the sysfs path of vga device is like this:
/sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0.

Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and
the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This
is because config_udev_odev_setup_attribs() use strstr() to search the
first "pci-" in ID_PATH. To fix this, we implement a strrstr() function
and use it to search the last "pci-" in ID_PATH, which can get a correct
BusID.

(backported from commit 9fbd3e43)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
3 jobs for server-1.20-branch in 5 minutes and 14 seconds (queued for 14 seconds)
Status Job ID Name Coverage
  Docker Image
passed #4145571
debian-testing

00:00:35

 
  Build And Test
passed #4145572
autotools-build-and-test

00:04:38

passed #4145573
meson-build-and-test

00:01:34