Skip to content

Commit a2b2823

Browse files
committed
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
2 parents 1735715 + f97a210 commit a2b2823

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/firmware/dmi-id.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ static void ascii_filter(char *d, const char *s)
7373

7474
static ssize_t get_modalias(char *buffer, size_t buffer_size)
7575
{
76+
/*
77+
* Note new fields need to be added at the end to keep compatibility
78+
* with udev's hwdb which does matches on "`cat dmi/id/modalias`*".
79+
*/
7680
static const struct mafield {
7781
const char *prefix;
7882
int field;
@@ -85,13 +89,13 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size)
8589
{ "svn", DMI_SYS_VENDOR },
8690
{ "pn", DMI_PRODUCT_NAME },
8791
{ "pvr", DMI_PRODUCT_VERSION },
88-
{ "sku", DMI_PRODUCT_SKU },
8992
{ "rvn", DMI_BOARD_VENDOR },
9093
{ "rn", DMI_BOARD_NAME },
9194
{ "rvr", DMI_BOARD_VERSION },
9295
{ "cvn", DMI_CHASSIS_VENDOR },
9396
{ "ct", DMI_CHASSIS_TYPE },
9497
{ "cvr", DMI_CHASSIS_VERSION },
98+
{ "sku", DMI_PRODUCT_SKU },
9599
{ NULL, DMI_NONE }
96100
};
97101

0 commit comments

Comments
 (0)