diff options
author | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2021-02-04 10:24:26 +0000 |
---|---|---|
committer | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2021-02-04 10:24:26 +0000 |
commit | f7ff717143c82aff519a34979b8dfa79acf72d47 (patch) | |
tree | 52c4353faf7f15880e860ded3a79bbec815ce629 /drivers/acpi/device_sysfs.c | |
parent | 9c8316d4da6e70ecbf18ce03c9105ed7124660d9 (diff) | |
parent | e89428970c23011a2679121c56e9f54f654c6602 (diff) |
Merge tag 'v5.4.95' into 5.4-2.3.x-imx
This is the 5.4.95 stable release
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'drivers/acpi/device_sysfs.c')
-rw-r--r-- | drivers/acpi/device_sysfs.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 96869f1538b9..bfca116482b8 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -251,20 +251,12 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev, if (add_uevent_var(env, "MODALIAS=")) return -ENOMEM; - len = create_pnp_modalias(adev, &env->buf[env->buflen - 1], - sizeof(env->buf) - env->buflen); - if (len < 0) - return len; - - env->buflen += len; - 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 (adev->data.of_compatible) + len = create_of_modalias(adev, &env->buf[env->buflen - 1], + sizeof(env->buf) - env->buflen); + else + len = create_pnp_modalias(adev, &env->buf[env->buflen - 1], + sizeof(env->buf) - env->buflen); if (len < 0) return len; |