mactel-support team mailing list archive
-
mactel-support team
-
Mailing list archive
-
Message #00405
[PATCH] applesmc: DMI reordering to properly match the Macbook Air (MBA)
The DMI matching algorithm in applesmc requires the most detailed product identifier to be
listed first. The current list violates this rule for the MBA, in effect being matched to
the regular Macbook. This patch moves the MBA to the appropriate place.
Bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/248238
Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>
---
drivers/hwmon/applesmc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 6a94e5a..1a7ecfe 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -1242,6 +1242,10 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
* So we need to put "Apple MacBook Pro" before "Apple MacBook". */
static __initdata struct dmi_system_id applesmc_whitelist[] = {
+ { applesmc_dmi_match, "Apple MacBook Air", {
+ DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"MacBookAir") },
+ (void*)&applesmc_dmi_data[7]},
{ applesmc_dmi_match, "Apple MacBook Pro", {
DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") },
@@ -1270,10 +1274,6 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
DMI_MATCH(DMI_PRODUCT_NAME,"iMac") },
(void*)&applesmc_dmi_data[5]},
- { applesmc_dmi_match, "Apple MacBook Air", {
- DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
- DMI_MATCH(DMI_PRODUCT_NAME,"MacBookAir") },
- (void*)&applesmc_dmi_data[7]},
{ .ident = NULL }
};
--
1.5.4.3