Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75806
b: refs/heads/master
c: 5b3f355
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent 51cfcec commit 15c61f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61030bfb79148b12b661580c8e3c2adfe1d9fc9e
refs/heads/master: 5b3f355d8fef95901505e924818b3031092453c2
15 changes: 7 additions & 8 deletions trunk/arch/x86/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,8 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
if (unlikely(retval < 0))
return retval;

cache_kobject[cpu]->parent = &sys_dev->kobj;
kobject_set_name(cache_kobject[cpu], "%s", "cache");
cache_kobject[cpu]->ktype = &ktype_percpu_entry;
retval = kobject_register(cache_kobject[cpu]);
retval = kobject_init_and_add(cache_kobject[cpu], &ktype_percpu_entry,
&sys_dev->kobj, "%s", "cache");
if (retval < 0) {
cpuid4_cache_sysfs_exit(cpu);
return retval;
Expand All @@ -746,10 +744,9 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
this_object = INDEX_KOBJECT_PTR(cpu,i);
this_object->cpu = cpu;
this_object->index = i;
this_object->kobj.parent = cache_kobject[cpu];
kobject_set_name(&(this_object->kobj), "index%1lu", i);
this_object->kobj.ktype = &ktype_cache;
retval = kobject_register(&(this_object->kobj));
retval = kobject_init_and_add(&(this_object->kobj),
&ktype_cache, cache_kobject[cpu],
"index%1lu", i);
if (unlikely(retval)) {
for (j = 0; j < i; j++) {
kobject_unregister(
Expand All @@ -759,10 +756,12 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
cpuid4_cache_sysfs_exit(cpu);
break;
}
kobject_uevent(&(this_object->kobj), KOBJ_ADD);
}
if (!retval)
cpu_set(cpu, cache_dev_map);

kobject_uevent(cache_kobject[cpu], KOBJ_ADD);
return retval;
}

Expand Down

0 comments on commit 15c61f9

Please sign in to comment.