cpu_sys_devices[cpu] = NULL; 
static int cpufreq_remove_dev (struct sys_device * sys_dev){	unsigned int cpu = sys_dev->id;	unsigned long flags;	struct cpufreq_policy *data;#ifdef CONFIG_SMP	unsigned int j;#endif	cpufreq_debug_disable_ratelimit();	dprintk("unregistering CPU %u\n", cpu);	spin_lock_irqsave(&cpufreq_driver_lock, flags);	data = cpufreq_cpu_data[cpu];	if (!data) {		spin_unlock_irqrestore(&cpufreq_driver_lock, flags);		cpu_sys_devices[cpu] = NULL;		cpufreq_debug_enable_ratelimit();		return -EINVAL;	}	cpufreq_cpu_data[cpu] = NULL;#ifdef CONFIG_SMP	/* if this isn't the CPU which is the parent of the kobj, we	 * only need to unlink, put and exit 	 */	if (unlikely(cpu != data->cpu)) {		dprintk("removing link\n");		spin_unlock_irqrestore(&cpufreq_driver_lock, flags);		sysfs_remove_link(&sys_dev->kobj, "cpufreq");		cpu_sys_devices[cpu] = NULL;		cpufreq_cpu_put(data);		cpufreq_debug_enable_ratelimit();		return 0;	}#endif	cpu_sys_devices[cpu] = NULL;	if (!kobject_get(&data->kobj)) {		spin_unlock_irqrestore(&cpufreq_driver_lock, flags);		cpufreq_debug_enable_ratelimit(); 		return -EFAULT;	}#ifdef CONFIG_SMP	/* if we have other CPUs still registered, we need to unlink them,	 * or else wait_for_completion below will lock up. Clean the	 * cpufreq_cpu_data[] while holding the lock, and remove the sysfs	 * links afterwards.	 */	if (unlikely(cpus_weight(data->cpus) > 1)) {		for_each_cpu_mask(j, data->cpus) {			if (j == cpu)				continue;			cpufreq_cpu_data[j] = NULL;		}	}	spin_unlock_irqrestore(&cpufreq_driver_lock, flags);	if (unlikely(cpus_weight(data->cpus) > 1)) {		for_each_cpu_mask(j, data->cpus) {			if (j == cpu)				continue;			dprintk("removing link for cpu %u\n", j);			sysfs_remove_link(&cpu_sys_devices[j]->kobj, "cpufreq");			cpufreq_cpu_put(data);		}	}#else	spin_unlock_irqrestore(&cpufreq_driver_lock, flags);#endif	down(&data->lock);	if (cpufreq_driver->target)		__cpufreq_governor(data, CPUFREQ_GOV_STOP);	cpufreq_driver->target = NULL;	up(&data->lock);	kobject_unregister(&data->kobj);	kobject_put(&data->kobj);	/* we need to make sure that the underlying kobj is actually	 * not referenced anymore by anybody before we proceed with 	 * unloading.	 */	dprintk("waiting for dropping of refcount\n");	wait_for_completion(&data->kobj_unregister);	dprintk("wait complete\n");	if (cpufreq_driver->exit)		cpufreq_driver->exit(data);	kfree(data);	cpufreq_debug_enable_ratelimit();	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d434fca737bee0862625c2377b987a7713b6b487/cpufreq.c/clean/drivers/cpufreq/cpufreq.c