diff options
Diffstat (limited to 'drivers/hwmon/hdaps.c')
-rw-r--r-- | drivers/hwmon/hdaps.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index 23a9e1ea8e32..1659f6c41458 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -509,12 +509,22 @@ static int hdaps_dmi_match_invert(struct dmi_system_id *id) | |||
509 | } \ | 509 | } \ |
510 | } | 510 | } |
511 | 511 | ||
512 | #define HDAPS_DMI_MATCH_LENOVO(model) { \ | ||
513 | .ident = "Lenovo " model, \ | ||
514 | .callback = hdaps_dmi_match_invert, \ | ||
515 | .matches = { \ | ||
516 | DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), \ | ||
517 | DMI_MATCH(DMI_PRODUCT_VERSION, model) \ | ||
518 | } \ | ||
519 | } | ||
520 | |||
512 | static int __init hdaps_init(void) | 521 | static int __init hdaps_init(void) |
513 | { | 522 | { |
514 | int ret; | 523 | int ret; |
515 | 524 | ||
516 | /* Note that DMI_MATCH(...,"ThinkPad T42") will match "ThinkPad T42p" */ | 525 | /* Note that DMI_MATCH(...,"ThinkPad T42") will match "ThinkPad T42p" */ |
517 | struct dmi_system_id hdaps_whitelist[] = { | 526 | struct dmi_system_id hdaps_whitelist[] = { |
527 | HDAPS_DMI_MATCH_NORMAL("ThinkPad H"), | ||
518 | HDAPS_DMI_MATCH_INVERT("ThinkPad R50p"), | 528 | HDAPS_DMI_MATCH_INVERT("ThinkPad R50p"), |
519 | HDAPS_DMI_MATCH_NORMAL("ThinkPad R50"), | 529 | HDAPS_DMI_MATCH_NORMAL("ThinkPad R50"), |
520 | HDAPS_DMI_MATCH_NORMAL("ThinkPad R51"), | 530 | HDAPS_DMI_MATCH_NORMAL("ThinkPad R51"), |
@@ -524,15 +534,17 @@ static int __init hdaps_init(void) | |||
524 | HDAPS_DMI_MATCH_INVERT("ThinkPad T42p"), | 534 | HDAPS_DMI_MATCH_INVERT("ThinkPad T42p"), |
525 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T42"), | 535 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T42"), |
526 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"), | 536 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"), |
537 | HDAPS_DMI_MATCH_LENOVO("ThinkPad T60p"), | ||
527 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"), | 538 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"), |
528 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X41 Tablet"), | 539 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X41 Tablet"), |
529 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X41"), | 540 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X41"), |
541 | HDAPS_DMI_MATCH_LENOVO("ThinkPad X60"), | ||
530 | { .ident = NULL } | 542 | { .ident = NULL } |
531 | }; | 543 | }; |
532 | 544 | ||
533 | if (!dmi_check_system(hdaps_whitelist)) { | 545 | if (!dmi_check_system(hdaps_whitelist)) { |
534 | printk(KERN_WARNING "hdaps: supported laptop not found!\n"); | 546 | printk(KERN_WARNING "hdaps: supported laptop not found!\n"); |
535 | ret = -ENXIO; | 547 | ret = -ENODEV; |
536 | goto out; | 548 | goto out; |
537 | } | 549 | } |
538 | 550 | ||