Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform driver updates from Matthew Garrett:
"A few small updates for 3.6 - a trivial regression fix and a couple of
conformance updates for the gmux driver, plus some tiny fixes for
asus-wmi, eeepc-laptop and thinkpad_acpi."

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
thinkpad_acpi: buffer overflow in fan_get_status()
eeepc-laptop: fix device reference count leakage in eeepc_rfkill_hotplug()
platform/x86: fix asus_laptop.wled_type description
asus-laptop: HRWS/HWRS typo
drivers-platform-x86: remove useless #ifdef CONFIG_ACPI_VIDEO
apple-gmux: Fix port address calculation in gmux_pio_write32()
apple-gmux: Fix index read functions
apple-gmux: Obtain version info from indexed gmux

+31 -36
-2
drivers/platform/x86/acer-wmi.c
··· 2196 2196 interface->capability &= ~ACER_CAP_BRIGHTNESS; 2197 2197 pr_info("Brightness must be controlled by acpi video driver\n"); 2198 2198 } else { 2199 - #ifdef CONFIG_ACPI_VIDEO 2200 2199 pr_info("Disabling ACPI video driver\n"); 2201 2200 acpi_video_unregister(); 2202 - #endif 2203 2201 } 2204 2202 2205 2203 if (wmi_has_guid(WMID_GUID3)) {
+13 -11
drivers/platform/x86/apple-gmux.c
··· 101 101 102 102 for (i = 0; i < 4; i++) { 103 103 tmpval = (val >> (i * 8)) & 0xff; 104 - outb(tmpval, port + i); 104 + outb(tmpval, gmux_data->iostart + port + i); 105 105 } 106 106 } 107 107 ··· 142 142 u8 val; 143 143 144 144 mutex_lock(&gmux_data->index_lock); 145 - outb((port & 0xff), gmux_data->iostart + GMUX_PORT_READ); 146 145 gmux_index_wait_ready(gmux_data); 146 + outb((port & 0xff), gmux_data->iostart + GMUX_PORT_READ); 147 + gmux_index_wait_complete(gmux_data); 147 148 val = inb(gmux_data->iostart + GMUX_PORT_VALUE); 148 149 mutex_unlock(&gmux_data->index_lock); 149 150 ··· 167 166 u32 val; 168 167 169 168 mutex_lock(&gmux_data->index_lock); 170 - outb((port & 0xff), gmux_data->iostart + GMUX_PORT_READ); 171 169 gmux_index_wait_ready(gmux_data); 170 + outb((port & 0xff), gmux_data->iostart + GMUX_PORT_READ); 171 + gmux_index_wait_complete(gmux_data); 172 172 val = inl(gmux_data->iostart + GMUX_PORT_VALUE); 173 173 mutex_unlock(&gmux_data->index_lock); 174 174 ··· 463 461 ver_release = gmux_read8(gmux_data, GMUX_PORT_VERSION_RELEASE); 464 462 if (ver_major == 0xff && ver_minor == 0xff && ver_release == 0xff) { 465 463 if (gmux_is_indexed(gmux_data)) { 464 + u32 version; 466 465 mutex_init(&gmux_data->index_lock); 467 466 gmux_data->indexed = true; 467 + version = gmux_read32(gmux_data, 468 + GMUX_PORT_VERSION_MAJOR); 469 + ver_major = (version >> 24) & 0xff; 470 + ver_minor = (version >> 16) & 0xff; 471 + ver_release = (version >> 8) & 0xff; 468 472 } else { 469 473 pr_info("gmux device not present\n"); 470 474 ret = -ENODEV; 471 475 goto err_release; 472 476 } 473 - pr_info("Found indexed gmux\n"); 474 - } else { 475 - pr_info("Found gmux version %d.%d.%d\n", ver_major, ver_minor, 476 - ver_release); 477 477 } 478 + pr_info("Found gmux version %d.%d.%d [%s]\n", ver_major, ver_minor, 479 + ver_release, (gmux_data->indexed ? "indexed" : "classic")); 478 480 479 481 memset(&props, 0, sizeof(props)); 480 482 props.type = BACKLIGHT_PLATFORM; ··· 511 505 * Disable the other backlight choices. 512 506 */ 513 507 acpi_video_dmi_promote_vendor(); 514 - #if defined (CONFIG_ACPI_VIDEO) || defined (CONFIG_ACPI_VIDEO_MODULE) 515 508 acpi_video_unregister(); 516 - #endif 517 509 apple_bl_unregister(); 518 510 519 511 gmux_data->power_state = VGA_SWITCHEROO_ON; ··· 597 593 kfree(gmux_data); 598 594 599 595 acpi_video_dmi_demote_vendor(); 600 - #if defined (CONFIG_ACPI_VIDEO) || defined (CONFIG_ACPI_VIDEO_MODULE) 601 596 acpi_video_register(); 602 - #endif 603 597 apple_bl_register(); 604 598 } 605 599
+5 -5
drivers/platform/x86/asus-laptop.c
··· 85 85 static char *bled_type = "unknown"; 86 86 87 87 module_param(wled_type, charp, 0444); 88 - MODULE_PARM_DESC(wlan_status, "Set the wled type on boot " 88 + MODULE_PARM_DESC(wled_type, "Set the wled type on boot " 89 89 "(unknown, led or rfkill). " 90 90 "default is unknown"); 91 91 ··· 863 863 * The significance of others is yet to be found. 864 864 * If we don't find the method, we assume the device are present. 865 865 */ 866 - rv = acpi_evaluate_integer(asus->handle, "HRWS", NULL, &temp); 866 + rv = acpi_evaluate_integer(asus->handle, "HWRS", NULL, &temp); 867 867 if (!ACPI_FAILURE(rv)) 868 - len += sprintf(page + len, "HRWS value : %#x\n", 868 + len += sprintf(page + len, "HWRS value : %#x\n", 869 869 (uint) temp); 870 870 /* 871 871 * Another value for userspace: the ASYM method returns 0x02 for ··· 1751 1751 * The significance of others is yet to be found. 1752 1752 */ 1753 1753 status = 1754 - acpi_evaluate_integer(asus->handle, "HRWS", NULL, &hwrs_result); 1754 + acpi_evaluate_integer(asus->handle, "HWRS", NULL, &hwrs_result); 1755 1755 if (!ACPI_FAILURE(status)) 1756 - pr_notice(" HRWS returned %x", (int)hwrs_result); 1756 + pr_notice(" HWRS returned %x", (int)hwrs_result); 1757 1757 1758 1758 if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL)) 1759 1759 asus->have_rsts = true;
-4
drivers/platform/x86/asus-wmi.c
··· 47 47 #include <linux/thermal.h> 48 48 #include <acpi/acpi_bus.h> 49 49 #include <acpi/acpi_drivers.h> 50 - #ifdef CONFIG_ACPI_VIDEO 51 50 #include <acpi/video.h> 52 - #endif 53 51 54 52 #include "asus-wmi.h" 55 53 ··· 1702 1704 if (asus->driver->quirks->wmi_backlight_power) 1703 1705 acpi_video_dmi_promote_vendor(); 1704 1706 if (!acpi_video_backlight_support()) { 1705 - #ifdef CONFIG_ACPI_VIDEO 1706 1707 pr_info("Disabling ACPI video driver\n"); 1707 1708 acpi_video_unregister(); 1708 - #endif 1709 1709 err = asus_wmi_backlight_init(asus); 1710 1710 if (err && err != -ENODEV) 1711 1711 goto fail_backlight;
+6 -4
drivers/platform/x86/eeepc-laptop.c
··· 610 610 611 611 if (!bus) { 612 612 pr_warn("Unable to find PCI bus 1?\n"); 613 - goto out_unlock; 613 + goto out_put_dev; 614 614 } 615 615 616 616 if (pci_bus_read_config_dword(bus, 0, PCI_VENDOR_ID, &l)) { 617 617 pr_err("Unable to read PCI config space?\n"); 618 - goto out_unlock; 618 + goto out_put_dev; 619 619 } 620 620 621 621 absent = (l == 0xffffffff); ··· 627 627 absent ? "absent" : "present"); 628 628 pr_warn("skipped wireless hotplug as probably " 629 629 "inappropriate for this model\n"); 630 - goto out_unlock; 630 + goto out_put_dev; 631 631 } 632 632 633 633 if (!blocked) { ··· 635 635 if (dev) { 636 636 /* Device already present */ 637 637 pci_dev_put(dev); 638 - goto out_unlock; 638 + goto out_put_dev; 639 639 } 640 640 dev = pci_scan_single_device(bus, 0); 641 641 if (dev) { ··· 650 650 pci_dev_put(dev); 651 651 } 652 652 } 653 + out_put_dev: 654 + pci_dev_put(port); 653 655 } 654 656 655 657 out_unlock:
-4
drivers/platform/x86/samsung-laptop.c
··· 26 26 #include <linux/seq_file.h> 27 27 #include <linux/debugfs.h> 28 28 #include <linux/ctype.h> 29 - #ifdef CONFIG_ACPI_VIDEO 30 29 #include <acpi/video.h> 31 - #endif 32 30 33 31 /* 34 32 * This driver is needed because a number of Samsung laptops do not hook ··· 1556 1558 samsung->handle_backlight = false; 1557 1559 } else if (samsung->quirks->broken_acpi_video) { 1558 1560 pr_info("Disabling ACPI video driver\n"); 1559 - #ifdef CONFIG_ACPI_VIDEO 1560 1561 acpi_video_unregister(); 1561 - #endif 1562 1562 } 1563 1563 #endif 1564 1564
+7 -6
drivers/platform/x86/thinkpad_acpi.c
··· 545 545 */ 546 546 547 547 static int acpi_evalf(acpi_handle handle, 548 - void *res, char *method, char *fmt, ...) 548 + int *res, char *method, char *fmt, ...) 549 549 { 550 550 char *fmt0 = fmt; 551 551 struct acpi_object_list params; ··· 606 606 success = (status == AE_OK && 607 607 out_obj.type == ACPI_TYPE_INTEGER); 608 608 if (success && res) 609 - *(int *)res = out_obj.integer.value; 609 + *res = out_obj.integer.value; 610 610 break; 611 611 case 'v': /* void */ 612 612 success = status == AE_OK; ··· 7386 7386 * Add TPACPI_FAN_RD_ACPI_FANS ? */ 7387 7387 7388 7388 switch (fan_status_access_mode) { 7389 - case TPACPI_FAN_RD_ACPI_GFAN: 7389 + case TPACPI_FAN_RD_ACPI_GFAN: { 7390 7390 /* 570, 600e/x, 770e, 770x */ 7391 + int res; 7391 7392 7392 - if (unlikely(!acpi_evalf(gfan_handle, &s, NULL, "d"))) 7393 + if (unlikely(!acpi_evalf(gfan_handle, &res, NULL, "d"))) 7393 7394 return -EIO; 7394 7395 7395 7396 if (likely(status)) 7396 - *status = s & 0x07; 7397 + *status = res & 0x07; 7397 7398 7398 7399 break; 7399 - 7400 + } 7400 7401 case TPACPI_FAN_RD_TPEC: 7401 7402 /* all except 570, 600e/x, 770e, 770x */ 7402 7403 if (unlikely(!acpi_ec_read(fan_status_offset, &s)))