More meth updates.
[linux-2.6/linux-mips.git] / drivers / base / cpu.c
blob4456bceabeafe80451d8c17f9a533802ffdf800f
1 /*
2 * drivers/base/cpu.c - basic CPU class support
3 */
5 #include <linux/sysdev.h>
6 #include <linux/module.h>
7 #include <linux/init.h>
8 #include <linux/cpu.h>
9 #include <linux/topology.h>
12 struct sysdev_class cpu_sysdev_class = {
13 set_kset_name("cpu"),
18 * register_cpu - Setup a driverfs device for a CPU.
19 * @num - CPU number to use when creating the device.
21 * Initialize and register the CPU device.
23 int __init register_cpu(struct cpu *cpu, int num, struct node *root)
25 cpu->node_id = cpu_to_node(num);
26 cpu->sysdev.id = num;
27 cpu->sysdev.cls = &cpu_sysdev_class;
28 return sys_device_register(&cpu->sysdev);
33 int __init cpu_dev_init(void)
35 return sysdev_class_register(&cpu_sysdev_class);