diff options
author | njl <njl@FreeBSD.org> | 2005-02-18 00:23:36 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-02-18 00:23:36 +0000 |
commit | 18a69f46e3ac23cb04aa2d1abf75f3aebf0c4e9a (patch) | |
tree | f4abd78e49b192efb6c1137801aa4a380e6e4218 /sys/kern/cpufreq_if.m | |
parent | c54115d548403a18776fc113c093f02b9b1b7cd6 (diff) | |
download | FreeBSD-src-18a69f46e3ac23cb04aa2d1abf75f3aebf0c4e9a.zip FreeBSD-src-18a69f46e3ac23cb04aa2d1abf75f3aebf0c4e9a.tar.gz |
Introduce a new method, cpufreq_drv_type(), that returns the type of the
driver. This used to be handled by cpufreq_drv_settings() but it's
useful to get the type/flags separately from getting the settings.
(For example, you don't have to pass an array of cf_setting just to find
the driver type.)
Use this new method in our in-tree drivers to detect reliably if acpi_perf
is present and owns the hardware. This simplifies logic in drivers as well
as fixing a bug introduced in my last commit where too many drivers attached.
Diffstat (limited to 'sys/kern/cpufreq_if.m')
-rw-r--r-- | sys/kern/cpufreq_if.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/cpufreq_if.m b/sys/kern/cpufreq_if.m index de1d531..8b1213e 100644 --- a/sys/kern/cpufreq_if.m +++ b/sys/kern/cpufreq_if.m @@ -88,5 +88,13 @@ METHOD int drv_settings { device_t dev; struct cf_setting *sets; int *count; +}; + +# +# Get an individual driver's type. +# +METHOD int drv_type { + device_t dev; int *type; }; + |