]> git.baikalelectronics.ru Git - kernel.git/commit
driver-core: cpu: fix kobject warning when hotplugging a cpu
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2012 23:11:17 +0000 (15:11 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2012 23:11:17 +0000 (15:11 -0800)
commit00bb1bffeb67d8eecde787b1d7fccbbc428c7f2c
treebed72baeafecb0e33e816709c432595804dc711d
parent24ec6f08833c4ca0aef23c60b02cc1f20288f8d0
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 <konrad.wilk@oracle.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cpu.c