diff options
Diffstat (limited to 'arch/x86/kernel/msr.c')
-rw-r--r-- | arch/x86/kernel/msr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 3cf3413ec626..98fd6cd4e3a4 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -196,6 +196,11 @@ static struct notifier_block __refdata msr_class_cpu_notifier = { | |||
196 | .notifier_call = msr_class_cpu_callback, | 196 | .notifier_call = msr_class_cpu_callback, |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static char *msr_nodename(struct device *dev) | ||
200 | { | ||
201 | return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt)); | ||
202 | } | ||
203 | |||
199 | static int __init msr_init(void) | 204 | static int __init msr_init(void) |
200 | { | 205 | { |
201 | int i, err = 0; | 206 | int i, err = 0; |
@@ -212,6 +217,7 @@ static int __init msr_init(void) | |||
212 | err = PTR_ERR(msr_class); | 217 | err = PTR_ERR(msr_class); |
213 | goto out_chrdev; | 218 | goto out_chrdev; |
214 | } | 219 | } |
220 | msr_class->nodename = msr_nodename; | ||
215 | for_each_online_cpu(i) { | 221 | for_each_online_cpu(i) { |
216 | err = msr_device_create(i); | 222 | err = msr_device_create(i); |
217 | if (err != 0) | 223 | if (err != 0) |