Commit 4b6fce59 authored by Olivier Fourdan's avatar Olivier Fourdan

Revert "linux: Fix platform device probe for DT-based PCI"

This reverts commit 249a12c5.

#1068
parent afb77415
......@@ -464,31 +464,6 @@ config_udev_fini(void)
#ifdef CONFIG_UDEV_KMS
/* Find the last occurrence of the needle in haystack */
static char *strrstr(const char *haystack, const char *needle)
{
char *prev, *last, *tmp;
prev = strstr(haystack, needle);
if (!prev)
return NULL;
last = prev;
tmp = prev + 1;
while (tmp) {
last = strstr(tmp, needle);
if (!last)
return prev;
else {
prev = last;
tmp = prev + 1;
}
}
return last;
}
static void
config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath,
int major, int minor,
......@@ -503,7 +478,7 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path
attribs->minor = minor;
value = udev_device_get_property_value(udev_device, "ID_PATH");
if (value && (str = strrstr(value, "pci-"))) {
if (value && (str = strstr(value, "pci-"))) {
attribs->busid = XNFstrdup(str);
attribs->busid[3] = ':';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment