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]
Date:	Mon, 18 Feb 2013 11:24:40 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Bengt Jonsson <bengt.g.jonsson@...ricsson.com>,
	Lee Jones <lee.jones@...aro.org>,
	Emeric Vigier <emeric.vigier@...ricsson.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org
Subject: [RFT][PATCH] regulator: ab8500: Remove get_voltage_sel for fixed
 voltage

Current code sets get_voltage_sel to ab8500_regulator_get_voltage_sel,
however both ab8500_regulator_mode_ops and ab8500_regulator_ops do not
have voltage_bank, voltage_reg and voltage_mask settings.
So it looks wrong to use ab8500_regulator_get_voltage_sel as
get_voltage_sel callback in these cases.

A simple fix is just not implement get_voltage_sel, regulator core will
report microvolts in sysfs even with only list_voltage().

Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
Just found this needs to be fixed after I sent previous ab8500 patches,
this patch is on top of previous ab8500 fixes.

Axel
 drivers/regulator/ab8500.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 24d490e..67b4412 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -362,7 +362,6 @@ static struct regulator_ops ab8500_regulator_mode_ops = {
 	.get_optimum_mode	= ab8500_regulator_get_optimum_mode,
 	.set_mode		= ab8500_regulator_set_mode,
 	.get_mode		= ab8500_regulator_get_mode,
-	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
 	.list_voltage		= regulator_list_voltage_linear,
 	.set_voltage_time_sel 	= ab8500_regulator_set_voltage_time_sel,
 };
@@ -371,7 +370,6 @@ static struct regulator_ops ab8500_regulator_ops = {
 	.enable			= ab8500_regulator_enable,
 	.disable		= ab8500_regulator_disable,
 	.is_enabled		= ab8500_regulator_is_enabled,
-	.get_voltage_sel 	= ab8500_regulator_get_voltage_sel,
 	.list_voltage		= regulator_list_voltage_linear,
 };
 
-- 
1.7.9.5



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