diff options
| author | Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> | 2025-10-17 01:05:10 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-22 08:59:57 +0300 |
| commit | f20c1dbe82f52ff24a366e1e72c4f19031915808 (patch) | |
| tree | d826a3cb9211cc2046fda622cb03dbe4fcaa1fc1 /scripts | |
| parent | b94eb28cb3ed624f7c335b8f4438b5ba36ea4885 (diff) | |
| download | linux-f20c1dbe82f52ff24a366e1e72c4f19031915808.tar.xz | |
apm-emulation: remove unused __apm_get_power_status
The API for apm_get_power_status is "call it if it isn't NULL",
except it's also initialised with a no-op __apm_get_power_status.
This was added alongside apm_get_power_status in 2007.
The apm_get_power_status symbol is used in these files:
arch/arm/mach-pxa/sharpsl_pm.c:extern void (*apm_get_power_status)(struct apm_power_info *);
arch/arm/mach-pxa/sharpsl_pm.c: apm_get_power_status = sharpsl_apm_get_power_status;
arch/sh/boards/mach-hp6xx/hp6xx_apm.c: apm_get_power_status = hp6x0_apm_get_power_status;
drivers/char/apm-emulation.c:void (*apm_get_power_status)(struct apm_power_info *) = __apm_get_power_status;
drivers/char/apm-emulation.c:EXPORT_SYMBOL(apm_get_power_status);
drivers/char/apm-emulation.c: if (apm_get_power_status)
drivers/char/apm-emulation.c: apm_get_power_status(&info);
drivers/macintosh/apm_emu.c: apm_get_power_status = pmu_apm_get_power_status;
drivers/macintosh/apm_emu.c: if (apm_get_power_status == pmu_apm_get_power_status)
drivers/macintosh/apm_emu.c: apm_get_power_status = NULL;
drivers/power/supply/apm_power.c: apm_get_power_status = apm_battery_apm_get_power_status;
drivers/power/supply/apm_power.c: apm_get_power_status = NULL;
include/linux/apm-emulation.h:extern void (*apm_get_power_status)(struct apm_power_info *);
All of them are compatible with the API (post-remove UAFs notwithstanding)
and don't even read it except to compare with their own values;
on a cursory glance this doesn't seem to have ever not been the case.
Fixes: 7726942fb15e ("[APM] Add shared version of APM emulation")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Link: https://patch.msgid.link/ba3nzxffdpuz2eo5kbpm5iez2rcdves3qpd4kvnmshxwjburwo@tarta.nabijaczleweli.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
