* [PATCH] Remove apparently useless, commented apm_get_battery_status().
@ 2007-06-04 11:15 Robert P. J. Day
2007-06-05 6:46 ` Anton Vorontsov
2007-07-10 11:09 ` David Woodhouse
0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2007-06-04 11:15 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Andrew Morton
Remove the "#if 0"ed definition of apm_get_battery_status().
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 4112afe..5c6da2b 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -1006,35 +1006,6 @@ static int apm_get_power_status(u_short *status, u_short *bat, u_short *life)
return APM_SUCCESS;
}
-#if 0
-static int apm_get_battery_status(u_short which, u_short *status,
- u_short *bat, u_short *life, u_short *nbat)
-{
- u32 eax;
- u32 ebx;
- u32 ecx;
- u32 edx;
- u32 esi;
-
- if (apm_info.connection_version < 0x0102) {
- /* pretend we only have one battery. */
- if (which != 1)
- return APM_BAD_DEVICE;
- *nbat = 1;
- return apm_get_power_status(status, bat, life);
- }
-
- if (apm_bios_call(APM_FUNC_GET_STATUS, (0x8000 | (which)), 0, &eax,
- &ebx, &ecx, &edx, &esi))
- return (eax >> 8) & 0xff;
- *status = ebx;
- *bat = ecx;
- *life = edx;
- *nbat = esi;
- return APM_SUCCESS;
-}
-#endif
-
/**
* apm_engage_power_management - enable PM on a device
* @device: identity of device
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove apparently useless, commented apm_get_battery_status().
2007-06-04 11:15 [PATCH] Remove apparently useless, commented apm_get_battery_status() Robert P. J. Day
@ 2007-06-05 6:46 ` Anton Vorontsov
2007-07-10 11:09 ` David Woodhouse
1 sibling, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2007-06-05 6:46 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Andrew Morton
On Mon, Jun 04, 2007 at 07:15:58AM -0400, Robert P. J. Day wrote:
>
> Remove the "#if 0"ed definition of apm_get_battery_status().
>
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Anton Vorontsov <cbou@mail.ru>
> ---
>
> diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
> index 4112afe..5c6da2b 100644
> --- a/arch/i386/kernel/apm.c
> +++ b/arch/i386/kernel/apm.c
> @@ -1006,35 +1006,6 @@ static int apm_get_power_status(u_short *status, u_short *bat, u_short *life)
> return APM_SUCCESS;
> }
>
> -#if 0
> -static int apm_get_battery_status(u_short which, u_short *status,
> - u_short *bat, u_short *life, u_short *nbat)
> -{
> - u32 eax;
> - u32 ebx;
> - u32 ecx;
> - u32 edx;
> - u32 esi;
> -
> - if (apm_info.connection_version < 0x0102) {
> - /* pretend we only have one battery. */
> - if (which != 1)
> - return APM_BAD_DEVICE;
> - *nbat = 1;
> - return apm_get_power_status(status, bat, life);
> - }
> -
> - if (apm_bios_call(APM_FUNC_GET_STATUS, (0x8000 | (which)), 0, &eax,
> - &ebx, &ecx, &edx, &esi))
> - return (eax >> 8) & 0xff;
> - *status = ebx;
> - *bat = ecx;
> - *life = edx;
> - *nbat = esi;
> - return APM_SUCCESS;
> -}
> -#endif
> -
> /**
> * apm_engage_power_management - enable PM on a device
> * @device: identity of device
> --
> ========================================================================
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry
> Waterloo, Ontario, CANADA
>
> http://fsdev.net/wiki/index.php?title=Main_Page
> ========================================================================
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.org/bd2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove apparently useless, commented apm_get_battery_status().
2007-06-04 11:15 [PATCH] Remove apparently useless, commented apm_get_battery_status() Robert P. J. Day
2007-06-05 6:46 ` Anton Vorontsov
@ 2007-07-10 11:09 ` David Woodhouse
1 sibling, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2007-07-10 11:09 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, Andrew Morton
On Mon, 2007-06-04 at 07:15 -0400, Robert P. J. Day wrote:
> Remove the "#if 0"ed definition of apm_get_battery_status().
>
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Nak. I think we want that when we implement the power_supply class
driver for APM batteries. Wanna write that driver? It shouldn't be hard.
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-10 11:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 11:15 [PATCH] Remove apparently useless, commented apm_get_battery_status() Robert P. J. Day
2007-06-05 6:46 ` Anton Vorontsov
2007-07-10 11:09 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox