diff options
Diffstat (limited to 'arch/x86/kernel/cpuid.c')
-rw-r--r-- | arch/x86/kernel/cpuid.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 2ac1f0c2beb3..b07af8861244 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -182,6 +182,11 @@ static struct notifier_block __refdata cpuid_class_cpu_notifier = | |||
182 | .notifier_call = cpuid_class_cpu_callback, | 182 | .notifier_call = cpuid_class_cpu_callback, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static char *cpuid_nodename(struct device *dev) | ||
186 | { | ||
187 | return kasprintf(GFP_KERNEL, "cpu/%u/cpuid", MINOR(dev->devt)); | ||
188 | } | ||
189 | |||
185 | static int __init cpuid_init(void) | 190 | static int __init cpuid_init(void) |
186 | { | 191 | { |
187 | int i, err = 0; | 192 | int i, err = 0; |
@@ -198,6 +203,7 @@ static int __init cpuid_init(void) | |||
198 | err = PTR_ERR(cpuid_class); | 203 | err = PTR_ERR(cpuid_class); |
199 | goto out_chrdev; | 204 | goto out_chrdev; |
200 | } | 205 | } |
206 | cpuid_class->nodename = cpuid_nodename; | ||
201 | for_each_online_cpu(i) { | 207 | for_each_online_cpu(i) { |
202 | err = cpuid_device_create(i); | 208 | err = cpuid_device_create(i); |
203 | if (err != 0) | 209 | if (err != 0) |