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 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?

Cheers,

Peter.
--
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