X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fbase%2Fcpu.c;h=aa66d7198d1c920d1d99248df9e0d4f325b82ec5;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=82b4430ab3412782e70a80891da5c57674a066bb;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 82b4430ab..aa66d7198 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -58,6 +58,8 @@ static inline void register_cpu_control(struct cpu *cpu) /* * register_cpu - Setup a driverfs device for a CPU. + * @cpu - Callers can set the cpu->no_control field to 1, to indicate not to + * generate a control file in sysfs for this CPU. * @num - CPU number to use when creating the device. * * Initialize and register the CPU device. @@ -75,7 +77,7 @@ int __init register_cpu(struct cpu *cpu, int num, struct node *root) error = sysfs_create_link(&root->sysdev.kobj, &cpu->sysdev.kobj, kobject_name(&cpu->sysdev.kobj)); - if (!error) + if (!error && !cpu->no_control) register_cpu_control(cpu); return error; }