diff options
Diffstat (limited to 'drivers/cpufreq/elanfreq.c')
-rw-r--r-- | drivers/cpufreq/elanfreq.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index c587db472a75..960671fd3d7e 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
25 | 25 | ||
26 | #include <asm/cpu_device_id.h> | ||
26 | #include <asm/msr.h> | 27 | #include <asm/msr.h> |
27 | #include <linux/timex.h> | 28 | #include <linux/timex.h> |
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
@@ -277,17 +278,16 @@ static struct cpufreq_driver elanfreq_driver = { | |||
277 | .attr = elanfreq_attr, | 278 | .attr = elanfreq_attr, |
278 | }; | 279 | }; |
279 | 280 | ||
281 | static const struct x86_cpu_id elan_id[] = { | ||
282 | { X86_VENDOR_AMD, 4, 10, }, | ||
283 | {} | ||
284 | }; | ||
285 | MODULE_DEVICE_TABLE(x86cpu, elan_id); | ||
280 | 286 | ||
281 | static int __init elanfreq_init(void) | 287 | static int __init elanfreq_init(void) |
282 | { | 288 | { |
283 | struct cpuinfo_x86 *c = &cpu_data(0); | 289 | if (!x86_match_cpu(elan_id)) |
284 | |||
285 | /* Test if we have the right hardware */ | ||
286 | if ((c->x86_vendor != X86_VENDOR_AMD) || | ||
287 | (c->x86 != 4) || (c->x86_model != 10)) { | ||
288 | printk(KERN_INFO "elanfreq: error: no Elan processor found!\n"); | ||
289 | return -ENODEV; | 290 | return -ENODEV; |
290 | } | ||
291 | return cpufreq_register_driver(&elanfreq_driver); | 291 | return cpufreq_register_driver(&elanfreq_driver); |
292 | } | 292 | } |
293 | 293 | ||