summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-09-10 17:41:41 +0000
committerjhb <jhb@FreeBSD.org>2008-09-10 17:41:41 +0000
commit069152e4330ec804d3e92617a2f0fcce7d169673 (patch)
tree985df7648ac942d9ca6f959919694de128c6781f /sys/i386
parent5bde7108b72730c16db2bf2725ab51ad69e8ac35 (diff)
downloadFreeBSD-src-069152e4330ec804d3e92617a2f0fcce7d169673.zip
FreeBSD-src-069152e4330ec804d3e92617a2f0fcce7d169673.tar.gz
Add a proper detach method to the est(4) driver using cpufreq_unregister().
MFC after: 1 week
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/cpufreq/est.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/i386/cpufreq/est.c b/sys/i386/cpufreq/est.c
index c75a31a..cff4219 100644
--- a/sys/i386/cpufreq/est.c
+++ b/sys/i386/cpufreq/est.c
@@ -1036,14 +1036,17 @@ est_attach(device_t dev)
static int
est_detach(device_t dev)
{
-#if 0
struct est_softc *sc;
+ int error;
+
+ error = cpufreq_unregister(dev);
+ if (error)
+ return (error);
sc = device_get_softc(dev);
if (sc->acpi_settings || sc->msr_settings)
free(sc->freq_list, M_DEVBUF);
-#endif
- return (ENXIO);
+ return (0);
}
/*
OpenPOWER on IntegriCloud