From 446c85af665cf6d911c4821ac9507c8ba0cc7e75 Mon Sep 17 00:00:00 2001 From: Ammar Faizi Date: Fri, 23 Dec 2022 21:24:18 +0700 Subject: ACPI: Silence missing prototype warnings Compiling with clang-16: drivers/acpi/acpi_lpit.c:142:6: error: no previous prototype \ for function 'acpi_init_lpit' [-Werror,-Wmissing-prototypes] drivers/acpi/ioapic.c:212:6: error: no previous prototype \ for function 'pci_ioapic_remove' [-Werror,-Wmissing-prototypes] drivers/acpi/ioapic.c:229:5: error: no previous prototype \ for function 'acpi_ioapic_remove' [-Werror,-Wmissing-prototypes] Include "internal.h" to silence them. Signed-off-by: Ammar Faizi Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_lpit.c | 1 + drivers/acpi/ioapic.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/acpi_lpit.c b/drivers/acpi/acpi_lpit.c index 50540d4d4948..3843d2576d3f 100644 --- a/drivers/acpi/acpi_lpit.c +++ b/drivers/acpi/acpi_lpit.c @@ -10,6 +10,7 @@ #include #include #include +#include "internal.h" struct lpit_residency_info { struct acpi_generic_address gaddr; diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c index a690c7b18623..6677955b4a8e 100644 --- a/drivers/acpi/ioapic.c +++ b/drivers/acpi/ioapic.c @@ -24,6 +24,7 @@ #include #include #include +#include "internal.h" struct acpi_pci_ioapic { acpi_handle root_handle; -- cgit v1.2.3 From 2d11eae42d52a131f06061015e49dc0f085c5bfc Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 2 Feb 2023 13:44:49 +0100 Subject: ACPI: video: Fix Lenovo Ideapad Z570 DMI match Multiple Ideapad Z570 variants need acpi_backlight=native to force native use on these pre Windows 8 machines since acpi_video backlight control does not work here. The original DMI quirk matches on a product_name of "102434U" but other variants may have different product_name-s such as e.g. "1024D9U". Move to checking product_version instead as is more or less standard for Lenovo DMI quirks for similar reasons. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki --- drivers/acpi/video_detect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index a8c02608dde4..710ac640267d 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -434,7 +434,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = { /* Lenovo Ideapad Z570 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_NAME, "102434U"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"), }, }, { -- cgit v1.2.3 From a527b0111798ed7b9f49830989eaabfe537e09ef Mon Sep 17 00:00:00 2001 From: Thomas Weißschuh Date: Tue, 14 Feb 2023 03:23:52 +0000 Subject: ACPI: make kobj_type structures constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki --- drivers/acpi/cppc_acpi.c | 2 +- drivers/acpi/device_sysfs.c | 2 +- drivers/acpi/sysfs.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 0f17b1c32718..a8f58b32d66f 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -193,7 +193,7 @@ static struct attribute *cppc_attrs[] = { }; ATTRIBUTE_GROUPS(cppc); -static struct kobj_type cppc_ktype = { +static const struct kobj_type cppc_ktype = { .sysfs_ops = &kobj_sysfs_ops, .default_groups = cppc_groups, }; diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 120873dad2cc..c3aa15571f16 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -78,7 +78,7 @@ static void acpi_data_node_release(struct kobject *kobj) complete(&dn->kobj_done); } -static struct kobj_type acpi_data_node_ktype = { +static const struct kobj_type acpi_data_node_ktype = { .sysfs_ops = &acpi_data_node_sysfs_ops, .default_groups = acpi_data_node_default_groups, .release = acpi_data_node_release, diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 7db3b530279b..7f4ff56c9d42 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -953,7 +953,7 @@ static struct attribute *hotplug_profile_attrs[] = { }; ATTRIBUTE_GROUPS(hotplug_profile); -static struct kobj_type acpi_hotplug_profile_ktype = { +static const struct kobj_type acpi_hotplug_profile_ktype = { .sysfs_ops = &kobj_sysfs_ops, .default_groups = hotplug_profile_groups, }; -- cgit v1.2.3