Commit b584b7e9 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'acpi-sysfs'

* acpi-sysfs:
  ACPI: sysfs: Prefer "compatible" modalias
parents 81b704d3 36af2d5c
...@@ -251,20 +251,12 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev, ...@@ -251,20 +251,12 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
if (add_uevent_var(env, "MODALIAS=")) if (add_uevent_var(env, "MODALIAS="))
return -ENOMEM; return -ENOMEM;
len = create_pnp_modalias(adev, &env->buf[env->buflen - 1], if (adev->data.of_compatible)
sizeof(env->buf) - env->buflen); len = create_of_modalias(adev, &env->buf[env->buflen - 1],
if (len < 0) sizeof(env->buf) - env->buflen);
return len; else
len = create_pnp_modalias(adev, &env->buf[env->buflen - 1],
env->buflen += len; sizeof(env->buf) - env->buflen);
if (!adev->data.of_compatible)
return 0;
if (len > 0 && add_uevent_var(env, "MODALIAS="))
return -ENOMEM;
len = create_of_modalias(adev, &env->buf[env->buflen - 1],
sizeof(env->buf) - env->buflen);
if (len < 0) if (len < 0)
return len; return len;
......
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