lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121118043533.GB18226@lizard.sbx05977.paloaca.wayport.net>
Date:	Sat, 17 Nov 2012 20:35:33 -0800
From:	Anton Vorontsov <cbouatmailru@...il.com>
To:	Ramakrishna Pallala <ramakrishna.pallala@...el.com>
Cc:	linux-kernel@...r.kernel.org, Jenny TC <jenny.tc@...el.com>,
	Durgadoss R <durgadoss.r@...el.com>
Subject: Re: [PATCH 2/2] power_supply: Register power supply for thermal
 cooling device

On Tue, Oct 09, 2012 at 10:25:59PM +0530, Ramakrishna Pallala wrote:
> This patch registers the power supply as a cooling device if the
> power supply has support for charge throttling.
> 
> Now with this change low level drivers need not register with
> thermal framework as it is automatically done by power supply framework.
> 
> Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@...el.com>
> ---
>  drivers/power/power_supply_core.c |  100 +++++++++++++++++++++++++++++++++++++
>  include/linux/power_supply.h      |    1 +
>  2 files changed, 101 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
> index 08cc8a3..3338d49 100644
> --- a/drivers/power/power_supply_core.c
> +++ b/drivers/power/power_supply_core.c
[...]
> +static int ps_get_max_charge_cntl_limit(struct thermal_cooling_device *tcd,
> +						unsigned long *state)
> +{
> +	struct power_supply *psy;
> +	union power_supply_propval val;
> +	int ret;
> +
> +	WARN_ON(tcd == NULL);
> +	psy = tcd->devdata;
> +	ret = psy->get_property(psy,
> +		POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX, &val);
> +	if (!ret)
> +		*state = val.intval;
> +
> +	return ret;
> +}
> +
> +static int ps_get_cur_chrage_cntl_limit(struct thermal_cooling_device *tcd,

Typo, "charge".

> +						unsigned long *state)
> +{
> +	struct power_supply *psy;
> +	union power_supply_propval val;
> +	int ret;
> +
> +	WARN_ON(tcd == NULL);

This is unneeded, we'll get oops anyway.

I fixed it up and applied, thank you!

Anton.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ