From: Balaji Rao Date: Fri, 8 Feb 2008 19:22:40 +0000 (+0530) Subject: cpufreq: fix kobject reference count handling X-Git-Tag: v2.6.25-rc3~96^2~8 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ab47050453c10da13940114dea9c7f1c6ad323f;p=linux-2.6-omap-h63xx.git cpufreq: fix kobject reference count handling The cpufreq core should not take an extra kobject reference count for no reason, and then refuse to release it. This has been reported as keeping machines from properly powering down all the way. Signed-off-by: Balaji Rao Cc: Dave Jones Cc: Yi Yang Cc: Alan Stern Cc: Frans Pop Cc: Yinghai Lu Cc: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 64926aa990d..89a29cd9378 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1006,14 +1006,6 @@ static int __cpufreq_remove_dev (struct sys_device * sys_dev) } #endif - - if (!kobject_get(&data->kobj)) { - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); - cpufreq_debug_enable_ratelimit(); - unlock_policy_rwsem_write(cpu); - return -EFAULT; - } - #ifdef CONFIG_SMP #ifdef CONFIG_HOTPLUG_CPU