summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpi_video.c1
-rw-r--r--drivers/acpi/battery.c9
-rw-r--r--drivers/acpi/cppc_acpi.c4
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/power.c13
-rw-r--r--drivers/acpi/sbshc.c2
-rw-r--r--drivers/acpi/x86/utils.c12
7 files changed, 29 insertions, 14 deletions
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 69469757b965..3d6e7306f29a 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -2116,6 +2116,7 @@ static void acpi_video_bus_remove(struct platform_device *pdev)
kfree(video->attached_array);
kfree(video);
+ device->driver_data = NULL;
}
static int __init is_i740(struct pci_dev *dev)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 3bbddd6f622c..8fbad8bc4650 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1066,9 +1066,6 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
struct acpi_device *device = battery->device;
struct power_supply *old;
- if (!battery)
- return;
-
guard(mutex)(&battery->update_lock);
old = battery->bat;
@@ -1274,13 +1271,9 @@ fail:
static void acpi_battery_remove(struct platform_device *pdev)
{
- struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
struct acpi_battery *battery = platform_get_drvdata(pdev);
- if (!device || !battery)
- return;
-
- acpi_dev_remove_notify_handler(device, ACPI_ALL_NOTIFY,
+ acpi_dev_remove_notify_handler(battery->device, ACPI_ALL_NOTIFY,
acpi_battery_notify);
device_init_wakeup(&pdev->dev, false);
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index c67494939f7b..431297cad76d 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -362,7 +362,7 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd)
end:
if (cmd == CMD_WRITE) {
if (unlikely(ret)) {
- for_each_possible_cpu(i) {
+ for_each_online_cpu(i) {
struct cpc_desc *desc = per_cpu(cpc_desc_ptr, i);
if (!desc)
@@ -524,7 +524,7 @@ int acpi_get_psd_map(unsigned int cpu, struct cppc_cpudata *cpu_data)
else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY)
cpu_data->shared_type = CPUFREQ_SHARED_TYPE_ANY;
- for_each_possible_cpu(i) {
+ for_each_online_cpu(i) {
if (i == cpu)
continue;
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 197970339edc..f7edc664e064 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1754,12 +1754,10 @@ err:
static void acpi_ec_remove(struct platform_device *pdev)
{
- struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
struct acpi_ec *ec = platform_get_drvdata(pdev);
release_region(ec->data_addr, 1);
release_region(ec->command_addr, 1);
- device->driver_data = NULL;
if (ec != boot_ec) {
ec_remove_handlers(ec);
acpi_ec_free(ec);
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 361a7721a6a8..7da5ae5594a7 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -1113,6 +1113,19 @@ static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"),
},
},
+ {
+ /*
+ * THUNDEROBOT ZERO laptop: Due to its SSDT table bug, power
+ * resource 'PXP' will be shut down on initialization, making
+ * the NVMe #2 and the NVIDIA dGPU both unavailable (they're
+ * both controlled by 'PXP').
+ */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "THUNDEROBOT"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ZERO"),
+ }
+
+ },
{}
};
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 7fc8ae7396d3..cb60d1d52e3e 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -275,13 +275,11 @@ static int acpi_smbus_hc_probe(struct platform_device *pdev)
static void acpi_smbus_hc_remove(struct platform_device *pdev)
{
- struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
struct acpi_smb_hc *hc = platform_get_drvdata(pdev);
acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
acpi_os_wait_events_complete();
kfree(hc);
- device->driver_data = NULL;
}
module_platform_driver(acpi_smb_hc_driver);
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 4ee30c2897a2..418951639f51 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -82,6 +82,18 @@ static const struct override_status_id override_status_ids[] = {
}),
/*
+ * Lenovo Yoga Book uses PWM2 for touch keyboard backlight control.
+ * It needs to be enabled only for the Android device version (YB1-X90*
+ * aka YETI-11); the Windows version (YB1-X91*) uses ACPI control
+ * methods.
+ */
+ PRESENT_ENTRY_HID("80862289", "2", INTEL_ATOM_AIRMONT, {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
+ }),
+
+ /*
* The INT0002 device is necessary to clear wakeup interrupt sources
* on Cherry Trail devices, without it we get nobody cared IRQ msgs.
*/