diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-11-03 14:04:57 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-01-30 10:57:26 +0000 |
commit | 87a6fc4860c85256efb73defef466bce067f178b (patch) | |
tree | 65cb2bb1a663b74cbb352f2b13a0ee66f62604fc | |
parent | 05bcd811627940b79639faec017139cc2c3f01e0 (diff) |
ACPI: convert acpi_processor_post_eject() to use IS_ENABLED()
Rather than ifdef'ing acpi_processor_post_eject() and its use site, use
IS_ENABLED() to increase compile coverage.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/acpi/acpi_processor.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 00809c3b09f7..5351095b6968 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -457,12 +457,14 @@ static int acpi_processor_add(struct acpi_device *device, return result; } -#ifdef CONFIG_ACPI_HOTPLUG_CPU /* Removal */ static void acpi_processor_post_eject(struct acpi_device *device) { struct acpi_processor *pr; + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_CPU)) + return; + if (!device || !acpi_driver_data(device)) return; @@ -501,7 +503,6 @@ static void acpi_processor_post_eject(struct acpi_device *device) free_cpumask_var(pr->throttling.shared_cpu_map); kfree(pr); } -#endif /* CONFIG_ACPI_HOTPLUG_CPU */ #ifdef CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC bool __init processor_physically_present(acpi_handle handle) @@ -626,9 +627,7 @@ static const struct acpi_device_id processor_device_ids[] = { static struct acpi_scan_handler processor_handler = { .ids = processor_device_ids, .attach = acpi_processor_add, -#ifdef CONFIG_ACPI_HOTPLUG_CPU .post_eject = acpi_processor_post_eject, -#endif .hotplug = { .enabled = true, }, |