Skip to content

Commit

Permalink
[PATCH] Make apm buildable without legacy pm
Browse files Browse the repository at this point in the history
APM doesn't _need_ the PM_LEGACY junk, so remove it's dependancy from
Kconfig, and ifdef the junk in the code.  Whilst the ifdefs are ugly, when
the legacy stuff gets ripped out so will the ifdefs.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Jan 9, 2006
1 parent 9fe656e commit 987d461
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ depends on PM && !X86_VISWS

config APM
tristate "APM (Advanced Power Management) BIOS support"
depends on PM && PM_LEGACY
depends on PM
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
Expand Down
4 changes: 4 additions & 0 deletions arch/i386/kernel/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,9 @@ static int __init apm_init(void)
apm_info.disabled = 1;
return -ENODEV;
}
#ifdef CONFIG_PM_LEGACY
pm_active = 1;
#endif

/*
* Set up a segment that references the real mode segment 0x40
Expand Down Expand Up @@ -2382,7 +2384,9 @@ static void __exit apm_exit(void)
exit_kapmd = 1;
while (kapmd_running)
schedule();
#ifdef CONFIG_PM_LEGACY
pm_active = 0;
#endif
}

module_init(apm_init);
Expand Down

0 comments on commit 987d461

Please sign in to comment.