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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1334292098.6122.1.camel@phoenix>
Date:	Fri, 13 Apr 2012 12:41:38 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Linus Walleij <linus.walleij@...ricsson.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...com>
Subject: [PATCH RFT 1/3] regulator: ab3100: Add dummy
 set_suspend_[enable|disable] callbacks implementation

Without the implementation of set_suspend_enable and set_suspend_disable callbacks,
the regulator core won't call set_suspend_voltage.

Thus add dummy implementation for set_suspend_[enable|disable] callbacks.

Signed-off-by: Axel Lin <axel.lin@...il.com>
---
 drivers/regulator/ab3100.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index ce61925..b08d92b 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -367,6 +367,17 @@ static int ab3100_set_voltage_regulator_sel(struct regulator_dev *reg,
 	return err;
 }
 
+/* Dummy set_suspend_enable/set_suspend_disable callbacks implementation */
+static int ab3100_set_suspend_enable(struct regulator_dev *rdev)
+{
+	return 0;
+}
+
+static int ab3100_set_suspend_disable(struct regulator_dev *rdev)
+{
+	return 0;
+}
+
 static int ab3100_set_suspend_voltage_regulator(struct regulator_dev *reg,
 						int uV)
 {
@@ -467,9 +478,12 @@ static struct regulator_ops regulator_ops_variable_sleepable = {
 	.is_enabled  = ab3100_is_enabled_regulator,
 	.get_voltage = ab3100_get_voltage_regulator,
 	.set_voltage_sel = ab3100_set_voltage_regulator_sel,
-	.set_suspend_voltage = ab3100_set_suspend_voltage_regulator,
 	.list_voltage = ab3100_list_voltage_regulator,
 	.enable_time = ab3100_enable_time_regulator,
+
+	.set_suspend_enable = ab3100_set_suspend_enable,
+	.set_suspend_disable = ab3100_set_suspend_disable,
+	.set_suspend_voltage = ab3100_set_suspend_voltage_regulator,
 };
 
 /*
-- 
1.7.5.4



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