aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/longrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/longrun.c')
-rw-r--r--drivers/cpufreq/longrun.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/cpufreq/longrun.c b/drivers/cpufreq/longrun.c
index 34ea359b370e..8bc9f5fbbaeb 100644
--- a/drivers/cpufreq/longrun.c
+++ b/drivers/cpufreq/longrun.c
@@ -14,6 +14,7 @@
14 14
15#include <asm/msr.h> 15#include <asm/msr.h>
16#include <asm/processor.h> 16#include <asm/processor.h>
17#include <asm/cpu_device_id.h>
17 18
18static struct cpufreq_driver longrun_driver; 19static struct cpufreq_driver longrun_driver;
19 20
@@ -288,6 +289,12 @@ static struct cpufreq_driver longrun_driver = {
288 .owner = THIS_MODULE, 289 .owner = THIS_MODULE,
289}; 290};
290 291
292static const struct x86_cpu_id longrun_ids[] = {
293 { X86_VENDOR_TRANSMETA, X86_FAMILY_ANY, X86_MODEL_ANY,
294 X86_FEATURE_LONGRUN },
295 {}
296};
297MODULE_DEVICE_TABLE(x86cpu, longrun_ids);
291 298
292/** 299/**
293 * longrun_init - initializes the Transmeta Crusoe LongRun CPUFreq driver 300 * longrun_init - initializes the Transmeta Crusoe LongRun CPUFreq driver
@@ -296,12 +303,8 @@ static struct cpufreq_driver longrun_driver = {
296 */ 303 */
297static int __init longrun_init(void) 304static int __init longrun_init(void)
298{ 305{
299 struct cpuinfo_x86 *c = &cpu_data(0); 306 if (!x86_match_cpu(longrun_ids))
300
301 if (c->x86_vendor != X86_VENDOR_TRANSMETA ||
302 !cpu_has(c, X86_FEATURE_LONGRUN))
303 return -ENODEV; 307 return -ENODEV;
304
305 return cpufreq_register_driver(&longrun_driver); 308 return cpufreq_register_driver(&longrun_driver);
306} 309}
307 310