From aa5cfd042036c4c96467e7d441763b905c3ea21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 18 Feb 2006 11:35:12 +0000 Subject: [PATCH] Load cpufreq at startup if it isn't there already. --- usr.sbin/powerd/powerd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 4c0d38330531..22bd1c38fd5c 100644 --- a/usr.sbin/powerd/powerd.c +++ b/usr.sbin/powerd/powerd.c @@ -433,6 +433,10 @@ main(int argc, char * argv[]) mode = mode_none; + /* Make sure the cpufreq module is loaded */ + if (!kld_isloaded("cpu/p4tcc") && kld_load("cpufreq") == -1) + err(1, "failed to load cpufreq module"); + /* Poll interval is in units of ms. */ poll_ival *= 1000;