From: Rafael J. Wysocki Date: Thu, 5 Mar 2026 20:10:38 +0000 (+0100) Subject: ACPI: AC: Get rid of unnecessary declarations X-Git-Tag: v7.1-rc1~215^2~1^2~2^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a0c7d388b6a19899ab0db60325699980706fb11;p=thirdparty%2Fkernel%2Flinux.git ACPI: AC: Get rid of unnecessary declarations Drop unnecessary forward declarations of 4 functions and move the SIMPLE_DEV_PM_OPS() definition after the definition of the resume callback function. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3757869.R56niFO833@rafael.j.wysocki --- diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index c5d77c3cb4bce..e0560a2c71a0b 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -33,22 +33,12 @@ MODULE_AUTHOR("Paul Diefenbaugh"); MODULE_DESCRIPTION("ACPI AC Adapter Driver"); MODULE_LICENSE("GPL"); -static int acpi_ac_probe(struct platform_device *pdev); -static void acpi_ac_remove(struct platform_device *pdev); - -static void acpi_ac_notify(acpi_handle handle, u32 event, void *data); - static const struct acpi_device_id ac_device_ids[] = { {"ACPI0003", 0}, {"", 0}, }; MODULE_DEVICE_TABLE(acpi, ac_device_ids); -#ifdef CONFIG_PM_SLEEP -static int acpi_ac_resume(struct device *dev); -#endif -static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); - static int ac_sleep_before_get_state_ms; static int ac_only; @@ -272,10 +262,10 @@ static int acpi_ac_resume(struct device *dev) return 0; } -#else -#define acpi_ac_resume NULL #endif +static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); + static void acpi_ac_remove(struct platform_device *pdev) { struct acpi_ac *ac = platform_get_drvdata(pdev);