diff options
author | Linus Torvalds | 2021-09-07 13:08:08 -0700 |
---|---|---|
committer | Linus Torvalds | 2021-09-07 13:08:08 -0700 |
commit | a2b28235335fee2586b4bd16448fb59ed6c80eef (patch) | |
tree | 198f8007239565abfb62136bea0545dd0520587c /drivers/firmware | |
parent | 1735715e0fd7a16972402ac98197e6cf30988a45 (diff) | |
parent | f97a2103f1a75ca70f23deadb4d96a16c4d85e7d (diff) |
Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull dmi fix from Jean Delvare.
Unbreak some existing udev/hwdb modalias matches due to misplaced
product_sku field.
* 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
firmware: dmi: Move product_sku info to the end of the modalias
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/dmi-id.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 4d5421d14a41..940ddf916202 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -73,6 +73,10 @@ static void ascii_filter(char *d, const char *s) static ssize_t get_modalias(char *buffer, size_t buffer_size) { + /* + * Note new fields need to be added at the end to keep compatibility + * with udev's hwdb which does matches on "`cat dmi/id/modalias`*". + */ static const struct mafield { const char *prefix; int field; @@ -85,13 +89,13 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size) { "svn", DMI_SYS_VENDOR }, { "pn", DMI_PRODUCT_NAME }, { "pvr", DMI_PRODUCT_VERSION }, - { "sku", DMI_PRODUCT_SKU }, { "rvn", DMI_BOARD_VENDOR }, { "rn", DMI_BOARD_NAME }, { "rvr", DMI_BOARD_VERSION }, { "cvn", DMI_CHASSIS_VENDOR }, { "ct", DMI_CHASSIS_TYPE }, { "cvr", DMI_CHASSIS_VERSION }, + { "sku", DMI_PRODUCT_SKU }, { NULL, DMI_NONE } }; |