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: <0c86e0d9585a4153049ac3eb0b9b8b1793a62e75.1714399603.git.mirq-linux@rere.qmqm.pl>
Date: Mon, 29 Apr 2024 16:45:32 +0200
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH v2 11/12] regulator/core: remove regulator_get/set_drvdata

There are no users of accessing regulator driver data via `struct
regulator` and there shouldn't be any as the struct is representing
a power consumer not the regulator itself.

Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
---
 drivers/regulator/core.c           | 24 ------------------------
 include/linux/regulator/consumer.h | 14 --------------
 2 files changed, 38 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index d7192530d3e0..010f4db2ce60 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -5908,30 +5908,6 @@ void *rdev_get_drvdata(struct regulator_dev *rdev)
 }
 EXPORT_SYMBOL_GPL(rdev_get_drvdata);
 
-/**
- * regulator_get_drvdata - get regulator driver data
- * @regulator: regulator
- *
- * Get regulator driver private data. This call can be used in the consumer
- * driver context when non API regulator specific functions need to be called.
- */
-void *regulator_get_drvdata(struct regulator *regulator)
-{
-	return regulator->rdev->reg_data;
-}
-EXPORT_SYMBOL_GPL(regulator_get_drvdata);
-
-/**
- * regulator_set_drvdata - set regulator driver data
- * @regulator: regulator
- * @data: data
- */
-void regulator_set_drvdata(struct regulator *regulator, void *data)
-{
-	regulator->rdev->reg_data = data;
-}
-EXPORT_SYMBOL_GPL(regulator_set_drvdata);
-
 /**
  * rdev_get_id - get regulator ID
  * @rdev: regulator
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 4660582a3302..ee84adba390a 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -268,10 +268,6 @@ int regulator_suspend_disable(struct regulator_dev *rdev,
 int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
 				  int max_uV, suspend_state_t state);
 
-/* driver data - core doesn't touch */
-void *regulator_get_drvdata(struct regulator *regulator);
-void regulator_set_drvdata(struct regulator *regulator, void *data);
-
 /* misc helpers */
 
 void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
@@ -607,16 +603,6 @@ static inline int regulator_set_suspend_voltage(struct regulator *regulator,
 	return -EINVAL;
 }
 
-static inline void *regulator_get_drvdata(struct regulator *regulator)
-{
-	return NULL;
-}
-
-static inline void regulator_set_drvdata(struct regulator *regulator,
-	void *data)
-{
-}
-
 static inline int regulator_count_voltages(struct regulator *regulator)
 {
 	return 0;
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ