Skip to content

Commit e37ae64

Browse files
KunWuChanbp3tk0v
authored andcommitted
x86/apm_32: Remove dead function apm_get_battery_status()
This part was commented out 25 years ago in: commit d43c43b46ebfdb437b78206fcc1992c4d2e8c15e Author: linus1 <torvalds@linuxfoundation.org> Date: Tue Sep 7 11:00:00 1999 -0600 Import 2.3.26pre1 and probably no one knows why. Probably it was unused even then. Just remove it. [ bp: Expand commit message. ] Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20240126030824.579711-1-chentao@kylinos.cn
1 parent 7d4002e commit e37ae64

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

arch/x86/kernel/apm_32.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,35 +1055,6 @@ static int apm_get_power_status(u_short *status, u_short *bat, u_short *life)
10551055
return APM_SUCCESS;
10561056
}
10571057

1058-
#if 0
1059-
static int apm_get_battery_status(u_short which, u_short *status,
1060-
u_short *bat, u_short *life, u_short *nbat)
1061-
{
1062-
u32 eax;
1063-
u32 ebx;
1064-
u32 ecx;
1065-
u32 edx;
1066-
u32 esi;
1067-
1068-
if (apm_info.connection_version < 0x0102) {
1069-
/* pretend we only have one battery. */
1070-
if (which != 1)
1071-
return APM_BAD_DEVICE;
1072-
*nbat = 1;
1073-
return apm_get_power_status(status, bat, life);
1074-
}
1075-
1076-
if (apm_bios_call(APM_FUNC_GET_STATUS, (0x8000 | (which)), 0, &eax,
1077-
&ebx, &ecx, &edx, &esi))
1078-
return (eax >> 8) & 0xff;
1079-
*status = ebx;
1080-
*bat = ecx;
1081-
*life = edx;
1082-
*nbat = esi;
1083-
return APM_SUCCESS;
1084-
}
1085-
#endif
1086-
10871058
/**
10881059
* apm_engage_power_management - enable PM on a device
10891060
* @device: identity of device

0 commit comments

Comments
 (0)