diff --git a/[refs] b/[refs] index 124b5b98a762..3b54f380cfea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a521cf209c6e7042f85b2c5b16da3ffa8004fb7b +refs/heads/master: 542eb75a27616bdde95c8d3764e0ab703579f8b5 diff --git a/trunk/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/trunk/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 2d65311d206e..ef15f35b10ed 100644 --- a/trunk/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/trunk/arch/x86/kernel/cpu/mcheck/mce_amd_64.c @@ -432,10 +432,9 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu, else per_cpu(threshold_banks, cpu)[bank]->blocks = b; - kobject_set_name(&b->kobj, "misc%i", block); - b->kobj.parent = per_cpu(threshold_banks, cpu)[bank]->kobj; - b->kobj.ktype = &threshold_ktype; - err = kobject_register(&b->kobj); + err = kobject_init_and_add(&b->kobj, &threshold_ktype, + per_cpu(threshold_banks, cpu)[bank]->kobj, + "misc%i", block); if (err) goto out_free; recurse: @@ -451,6 +450,8 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu, if (err) goto out_free; + kobject_uevent(&b->kobj, KOBJ_ADD); + return err; out_free: