Re: [PATCH 3/5][RFC] cpuidle : add a pointer for cpuidle_state in the cpuidle_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/03/2012 05:16 PM, Peter De Schrijver wrote:
> On Wed, Jul 25, 2012 at 12:46:00PM +0200, Daniel Lezcano wrote:
>> This patch adds a pointer to the cpuidle_state array in the cpuidle_device
>> structure. When the cpuidle_device is initialized, the pointer is assigned
>> from the driver's cpuidle states array.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
>> ---
>>  drivers/cpuidle/cpuidle.c |    1 +
>>  include/linux/cpuidle.h   |    1 +
>>  2 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
>> index d6a533e..42b1a8a 100644
>> --- a/drivers/cpuidle/cpuidle.c
>> +++ b/drivers/cpuidle/cpuidle.c
>> @@ -305,6 +305,7 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
>>  		return -EIO;
>>  	if (!dev->state_count)
>>  		dev->state_count = drv->state_count;
>> +	dev->states = drv->states;
> 
> This should only be done when dev->state_count == 0 no?

Right. In acpi/processor_idle.c, the state count for the device is
initialized and I overwritten this value in all the cases, but this not
right. I removed the initialization in acpi because it is pointless and
moved this line to do the 'if' block as you mentioned.

Thanks
  -- Daniel



-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux