diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/topology.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 8d8cdfec6529..e1d3ad4db2f0 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
@@ -94,27 +94,18 @@ static struct attribute_group topology_attr_group = { | |||
94 | .name = "topology" | 94 | .name = "topology" |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static cpumask_t topology_dev_map = CPU_MASK_NONE; | ||
98 | |||
99 | /* Add/Remove cpu_topology interface for CPU device */ | 97 | /* Add/Remove cpu_topology interface for CPU device */ |
100 | static int __cpuinit topology_add_dev(unsigned int cpu) | 98 | static int __cpuinit topology_add_dev(unsigned int cpu) |
101 | { | 99 | { |
102 | int rc; | ||
103 | struct sys_device *sys_dev = get_cpu_sysdev(cpu); | 100 | struct sys_device *sys_dev = get_cpu_sysdev(cpu); |
104 | 101 | ||
105 | rc = sysfs_create_group(&sys_dev->kobj, &topology_attr_group); | 102 | return sysfs_create_group(&sys_dev->kobj, &topology_attr_group); |
106 | if (!rc) | ||
107 | cpu_set(cpu, topology_dev_map); | ||
108 | return rc; | ||
109 | } | 103 | } |
110 | 104 | ||
111 | static void __cpuinit topology_remove_dev(unsigned int cpu) | 105 | static void __cpuinit topology_remove_dev(unsigned int cpu) |
112 | { | 106 | { |
113 | struct sys_device *sys_dev = get_cpu_sysdev(cpu); | 107 | struct sys_device *sys_dev = get_cpu_sysdev(cpu); |
114 | 108 | ||
115 | if (!cpu_isset(cpu, topology_dev_map)) | ||
116 | return; | ||
117 | cpu_clear(cpu, topology_dev_map); | ||
118 | sysfs_remove_group(&sys_dev->kobj, &topology_attr_group); | 109 | sysfs_remove_group(&sys_dev->kobj, &topology_attr_group); |
119 | } | 110 | } |
120 | 111 | ||