mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
driver-core: cpu: fix kobject warning when hotplugging a cpu
Due to the sysdev conversion to struct device, the cpu objects get reused when adding a cpu after offlining it, which causes a big warning that the kobject portion is not properly initialized. So clear out the object before we register it again, so all is quiet. Reported-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
15f5113671
commit
29bb5d4fd3
1 changed files with 1 additions and 0 deletions
|
|
@ -240,6 +240,7 @@ int __cpuinit register_cpu(struct cpu *cpu, int num)
|
|||
int error;
|
||||
|
||||
cpu->node_id = cpu_to_node(num);
|
||||
memset(&cpu->dev, 0x00, sizeof(struct device));
|
||||
cpu->dev.id = num;
|
||||
cpu->dev.bus = &cpu_subsys;
|
||||
cpu->dev.release = cpu_device_release;
|
||||
|
|
|
|||
Loading…
Reference in a new issue