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

Merge tag 'platform-drivers-x86-v6.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:

- amd/pmc: Add quirk for MECHREVO Wujie 15X Pro

- classmate-laptop: Add missing NULL pointer checks

- hp-bioscfg: Skip empty attribute names

- intel_telemetry:
- Fix PSS event register mask
- Fix swapped arrays in PSS output

- intel/tpmi/plr: Make the file domain<n>/status writeable

- intel/vsec: Add Nova Lake PUNIT support

- lg-laptop: Recognize 2022-2025 models

- panasonic-laptop: Fix sysfs group leak in error path

- toshiba_haps: Fix memory leaks in add/remove routines

* tag 'platform-drivers-x86-v6.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86/intel/tpmi/plr: Make the file domain<n>/status writeable
platform/x86: hp-bioscfg: Skip empty attribute names
platform/x86: classmate-laptop: Add missing NULL pointer checks
platform/x86: lg-laptop: Recognize 2022-2025 models
platform/x86/amd/pmc: Add quirk for MECHREVO Wujie 15X Pro
platform/x86: intel_telemetry: Fix PSS event register mask
platform/x86: intel_telemetry: Fix swapped arrays in PSS output
platform/x86/intel/vsec: Add Nova Lake PUNIT support
platform/x86: toshiba_haps: Fix memory leaks in add/remove routines
platform/x86: panasonic-laptop: Fix sysfs group leak in error path

+64 -7
+7
drivers/platform/x86/amd/pmc/pmc-quirks.c
··· 302 302 DMI_MATCH(DMI_BOARD_NAME, "XxKK4NAx_XxSP4NAx"), 303 303 } 304 304 }, 305 + { 306 + .ident = "MECHREVO Wujie 15X Pro", 307 + .driver_data = &quirk_spurious_8042, 308 + .matches = { 309 + DMI_MATCH(DMI_BOARD_NAME, "WUJIE Series-X5SP4NAG"), 310 + } 311 + }, 305 312 {} 306 313 }; 307 314
+32
drivers/platform/x86/classmate-laptop.c
··· 207 207 208 208 acpi = to_acpi_device(dev); 209 209 inputdev = dev_get_drvdata(&acpi->dev); 210 + if (!inputdev) 211 + return -ENXIO; 212 + 210 213 accel = dev_get_drvdata(&inputdev->dev); 214 + if (!accel) 215 + return -ENXIO; 211 216 212 217 return sysfs_emit(buf, "%d\n", accel->sensitivity); 213 218 } ··· 229 224 230 225 acpi = to_acpi_device(dev); 231 226 inputdev = dev_get_drvdata(&acpi->dev); 227 + if (!inputdev) 228 + return -ENXIO; 229 + 232 230 accel = dev_get_drvdata(&inputdev->dev); 231 + if (!accel) 232 + return -ENXIO; 233 233 234 234 r = kstrtoul(buf, 0, &sensitivity); 235 235 if (r) ··· 266 256 267 257 acpi = to_acpi_device(dev); 268 258 inputdev = dev_get_drvdata(&acpi->dev); 259 + if (!inputdev) 260 + return -ENXIO; 261 + 269 262 accel = dev_get_drvdata(&inputdev->dev); 263 + if (!accel) 264 + return -ENXIO; 270 265 271 266 return sysfs_emit(buf, "%d\n", accel->g_select); 272 267 } ··· 288 273 289 274 acpi = to_acpi_device(dev); 290 275 inputdev = dev_get_drvdata(&acpi->dev); 276 + if (!inputdev) 277 + return -ENXIO; 278 + 291 279 accel = dev_get_drvdata(&inputdev->dev); 280 + if (!accel) 281 + return -ENXIO; 292 282 293 283 r = kstrtoul(buf, 0, &g_select); 294 284 if (r) ··· 322 302 323 303 acpi = to_acpi_device(input->dev.parent); 324 304 accel = dev_get_drvdata(&input->dev); 305 + if (!accel) 306 + return -ENXIO; 325 307 326 308 cmpc_accel_set_sensitivity_v4(acpi->handle, accel->sensitivity); 327 309 cmpc_accel_set_g_select_v4(acpi->handle, accel->g_select); ··· 571 549 572 550 acpi = to_acpi_device(dev); 573 551 inputdev = dev_get_drvdata(&acpi->dev); 552 + if (!inputdev) 553 + return -ENXIO; 554 + 574 555 accel = dev_get_drvdata(&inputdev->dev); 556 + if (!accel) 557 + return -ENXIO; 575 558 576 559 return sysfs_emit(buf, "%d\n", accel->sensitivity); 577 560 } ··· 593 566 594 567 acpi = to_acpi_device(dev); 595 568 inputdev = dev_get_drvdata(&acpi->dev); 569 + if (!inputdev) 570 + return -ENXIO; 571 + 596 572 accel = dev_get_drvdata(&inputdev->dev); 573 + if (!accel) 574 + return -ENXIO; 597 575 598 576 r = kstrtoul(buf, 0, &sensitivity); 599 577 if (r)
+5
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
··· 696 696 return ret; 697 697 } 698 698 699 + if (!str_value || !str_value[0]) { 700 + pr_debug("Ignoring attribute with empty name\n"); 701 + goto pack_attr_exit; 702 + } 703 + 699 704 /* All duplicate attributes found are ignored */ 700 705 duplicate = kset_find_obj(temp_kset, str_value); 701 706 if (duplicate) {
+1 -1
drivers/platform/x86/intel/plr_tpmi.c
··· 316 316 snprintf(name, sizeof(name), "domain%d", i); 317 317 318 318 dentry = debugfs_create_dir(name, plr->dbgfs_dir); 319 - debugfs_create_file("status", 0444, dentry, &plr->die_info[i], 319 + debugfs_create_file("status", 0644, dentry, &plr->die_info[i], 320 320 &plr_status_fops); 321 321 } 322 322
+2 -2
drivers/platform/x86/intel/telemetry/debugfs.c
··· 449 449 for (index = 0; index < debugfs_conf->pss_ltr_evts; index++) { 450 450 seq_printf(s, "%-32s\t%u\n", 451 451 debugfs_conf->pss_ltr_data[index].name, 452 - pss_s0ix_wakeup[index]); 452 + pss_ltr_blkd[index]); 453 453 } 454 454 455 455 seq_puts(s, "\n--------------------------------------\n"); ··· 459 459 for (index = 0; index < debugfs_conf->pss_wakeup_evts; index++) { 460 460 seq_printf(s, "%-32s\t%u\n", 461 461 debugfs_conf->pss_wakeup[index].name, 462 - pss_ltr_blkd[index]); 462 + pss_s0ix_wakeup[index]); 463 463 } 464 464 465 465 return 0;
+1 -1
drivers/platform/x86/intel/telemetry/pltdrv.c
··· 610 610 /* Get telemetry Info */ 611 611 events = (read_buf & TELEM_INFO_SRAMEVTS_MASK) >> 612 612 TELEM_INFO_SRAMEVTS_SHIFT; 613 - event_regs = read_buf & TELEM_INFO_SRAMEVTS_MASK; 613 + event_regs = read_buf & TELEM_INFO_NENABLES_MASK; 614 614 if ((events < TELEM_MAX_EVENTS_SRAM) || 615 615 (event_regs < TELEM_MAX_EVENTS_SRAM)) { 616 616 dev_err(&pdev->dev, "PSS:Insufficient Space for SRAM Trace\n");
+2
drivers/platform/x86/intel/vsec.c
··· 766 766 #define PCI_DEVICE_ID_INTEL_VSEC_LNL_M 0x647d 767 767 #define PCI_DEVICE_ID_INTEL_VSEC_PTL 0xb07d 768 768 #define PCI_DEVICE_ID_INTEL_VSEC_WCL 0xfd7d 769 + #define PCI_DEVICE_ID_INTEL_VSEC_NVL 0xd70d 769 770 static const struct pci_device_id intel_vsec_pci_ids[] = { 770 771 { PCI_DEVICE_DATA(INTEL, VSEC_ADL, &tgl_info) }, 771 772 { PCI_DEVICE_DATA(INTEL, VSEC_DG1, &dg1_info) }, ··· 779 778 { PCI_DEVICE_DATA(INTEL, VSEC_LNL_M, &lnl_info) }, 780 779 { PCI_DEVICE_DATA(INTEL, VSEC_PTL, &mtl_info) }, 781 780 { PCI_DEVICE_DATA(INTEL, VSEC_WCL, &mtl_info) }, 781 + { PCI_DEVICE_DATA(INTEL, VSEC_NVL, &mtl_info) }, 782 782 { } 783 783 }; 784 784 MODULE_DEVICE_TABLE(pci, intel_vsec_pci_ids);
+10 -1
drivers/platform/x86/lg-laptop.c
··· 838 838 case 'P': 839 839 year = 2021; 840 840 break; 841 - default: 841 + case 'Q': 842 842 year = 2022; 843 + break; 844 + case 'R': 845 + year = 2023; 846 + break; 847 + case 'S': 848 + year = 2024; 849 + break; 850 + default: 851 + year = 2025; 843 852 } 844 853 break; 845 854 default:
+3 -1
drivers/platform/x86/panasonic-laptop.c
··· 1089 1089 PLATFORM_DEVID_NONE, NULL, 0); 1090 1090 if (IS_ERR(pcc->platform)) { 1091 1091 result = PTR_ERR(pcc->platform); 1092 - goto out_backlight; 1092 + goto out_sysfs; 1093 1093 } 1094 1094 result = device_create_file(&pcc->platform->dev, 1095 1095 &dev_attr_cdpower); ··· 1105 1105 1106 1106 out_platform: 1107 1107 platform_device_unregister(pcc->platform); 1108 + out_sysfs: 1109 + sysfs_remove_group(&device->dev.kobj, &pcc_attr_group); 1108 1110 out_backlight: 1109 1111 backlight_device_unregister(pcc->backlight); 1110 1112 out_input:
+1 -1
drivers/platform/x86/toshiba_haps.c
··· 183 183 184 184 pr_info("Toshiba HDD Active Protection Sensor device\n"); 185 185 186 - haps = kzalloc(sizeof(struct toshiba_haps_dev), GFP_KERNEL); 186 + haps = devm_kzalloc(&acpi_dev->dev, sizeof(*haps), GFP_KERNEL); 187 187 if (!haps) 188 188 return -ENOMEM; 189 189