platform-drivers-x86 for v5.8-2
* Fix procfs handling in Thinkpad ACPI driver * Fix battery management on new ASUS laptops * New IDs (Sapphire Rapids) in ISST tool The following is an automated git shortlog grouped by driver: asus-wmi: - allow BAT1 battery name ISST: - Add new PCI device ids thinkpad_acpi: - Revert "Use strndup_user() in dispatch_proc_write()" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAl8O0n0ACgkQb7wzTHR8 rCjcHxAAriloNeCvSdVTHCptckPsClbfKiewJZCzAtsd8QxxOQJvNevF0lVouunR kHb5w41W8I/iqA6lFoSPj7nCpfLNLJWVui1TlIO3zQ7Py/zHZHNpWrGZyvmQHQo/ BYa8KysC6iO6GBfRWONb9S+3hNT8DQcvCTWT4u4X3kFrx2ZGg/Wrh26cpP5AL5H6 NitpNEgERj5dL7AkMB0m+pWmyTQrynEC5zjAnktDmOok2hTRPxFCILvnj0KeR09A zKSSvAN7dLcjIZ9KZRP+QhN/6bfv4UpHmhAy9Z7Vlr9peO6FWjHtJmt9EjElTBKX Nd/cLTq/LLj6Bd8adiZNwi4bNM8HLpG7Oe9Ld3CrXRHW/sWP2xWEnJF+FTDM8VdS yCCsCKQD4yLe7yf4S/nhBKtTpxT1HLehSZ+wBx3MSRHBkG8f2X9m2JBghpca3SX9 /4G9WA96Pwm/19/ydErJigtoPYr7RsF/pWdJVBKcku5svk/H5UHi2lmiBvaD+5Kd 5lNxWcaz9Hxz32R4pzwRIlnXpgoBbBBvy8GyVheJNC5XLJ1kKG6WA6dWtA/gUUUZ xTfnQFyDMscoHMdVDDSEA5Joo5L6cDFtIGgB8RDWypxdhHhxbOWitH/hsCakTC74 jjJ8b6A1mX7+6KcxyUwYhSSMHl+CHUWue4I3RVJFebbgyzM6AQ0= =sggr -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86 into master Pull x86 platform driver fixes from Andriy Shevchenko: "Small fixes for this cycle: - Fix procfs handling in Thinkpad ACPI driver - Fix battery management on new ASUS laptops - New IDs (Sapphire Rapids) in ISST tool" * tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: asus-wmi: allow BAT1 battery name platform/x86: ISST: Add new PCI device ids platform/x86: thinkpad_acpi: Revert "Use strndup_user() in dispatch_proc_write()"
This commit is contained in:
commit
994e99a96c
|
@ -441,6 +441,7 @@ static int asus_wmi_battery_add(struct power_supply *battery)
|
|||
* battery is named BATT.
|
||||
*/
|
||||
if (strcmp(battery->desc->name, "BAT0") != 0 &&
|
||||
strcmp(battery->desc->name, "BAT1") != 0 &&
|
||||
strcmp(battery->desc->name, "BATT") != 0)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
#define INTEL_RAPL_PRIO_DEVID_0 0x3451
|
||||
#define INTEL_CFG_MBOX_DEVID_0 0x3459
|
||||
|
||||
#define INTEL_RAPL_PRIO_DEVID_1 0x3251
|
||||
#define INTEL_CFG_MBOX_DEVID_1 0x3259
|
||||
|
||||
/*
|
||||
* Validate maximum commands in a single request.
|
||||
* This is enough to handle command to every core in one ioctl, or all
|
||||
|
|
|
@ -147,6 +147,7 @@ static long isst_if_mbox_proc_cmd(u8 *cmd_ptr, int *write_only, int resume)
|
|||
|
||||
static const struct pci_device_id isst_if_mbox_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_CFG_MBOX_DEVID_0)},
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_CFG_MBOX_DEVID_1)},
|
||||
{ 0 },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, isst_if_mbox_ids);
|
||||
|
|
|
@ -72,6 +72,7 @@ static long isst_if_mmio_rd_wr(u8 *cmd_ptr, int *write_only, int resume)
|
|||
|
||||
static const struct pci_device_id isst_if_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_RAPL_PRIO_DEVID_0)},
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_RAPL_PRIO_DEVID_1)},
|
||||
{ 0 },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, isst_if_ids);
|
||||
|
|
|
@ -885,11 +885,19 @@ static ssize_t dispatch_proc_write(struct file *file,
|
|||
|
||||
if (!ibm || !ibm->write)
|
||||
return -EINVAL;
|
||||
if (count > PAGE_SIZE - 1)
|
||||
return -EINVAL;
|
||||
|
||||
kernbuf = strndup_user(userbuf, PAGE_SIZE);
|
||||
if (IS_ERR(kernbuf))
|
||||
return PTR_ERR(kernbuf);
|
||||
kernbuf = kmalloc(count + 1, GFP_KERNEL);
|
||||
if (!kernbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
if (copy_from_user(kernbuf, userbuf, count)) {
|
||||
kfree(kernbuf);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
kernbuf[count] = 0;
|
||||
ret = ibm->write(kernbuf);
|
||||
if (ret == 0)
|
||||
ret = count;
|
||||
|
|
Loading…
Reference in New Issue