aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cpufreq
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2005-02-17 01:01:40 +0000
committerNate Lawson <njl@FreeBSD.org>2005-02-17 01:01:40 +0000
commit6655857ec7b8ca3beb28de35e587e8f28cde6f2e (patch)
treeee39134d4d1058f0cf55e488ef88bb8565577b4e /sys/dev/cpufreq
parenteab1708c9e23f9596e5b75ebbe92f45fef5815a6 (diff)
Notes
Diffstat (limited to 'sys/dev/cpufreq')
-rw-r--r--sys/dev/cpufreq/ichss.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/cpufreq/ichss.c b/sys/dev/cpufreq/ichss.c
index 3c9ee53128b09..9f19cd4a94ac1 100644
--- a/sys/dev/cpufreq/ichss.c
+++ b/sys/dev/cpufreq/ichss.c
@@ -209,12 +209,22 @@ ichss_pci_probe(device_t dev)
static int
ichss_probe(device_t dev)
{
+ struct cf_setting set;
device_t perf_dev;
+ int count, type;
- /* If the ACPI perf driver has attached, let it manage things. */
- perf_dev = devclass_get_device(devclass_find("acpi_perf"), 0);
- if (perf_dev && device_is_attached(perf_dev))
- return (ENXIO);
+ /*
+ * If the ACPI perf driver has attached and is not just offering
+ * info, let it manage things.
+ */
+ perf_dev = device_find_child(device_get_parent(dev), "acpi_perf", -1);
+ if (perf_dev && device_is_attached(perf_dev)) {
+ type = 0;
+ count = 1;
+ CPUFREQ_DRV_SETTINGS(perf_dev, &set, &count, &type);
+ if ((type & CPUFREQ_FLAG_INFO_ONLY) == 0)
+ return (ENXIO);
+ }
device_set_desc(dev, "SpeedStep ICH");
return (-1000);