From: linux@treblig.org
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-doc@vger.kernel.org, corbet@lwn.net,
linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 3/5] regulator: core: Remove unused regulator_*drvdata functions
Date: Sat, 26 Apr 2025 18:51:41 +0100 [thread overview]
Message-ID: <20250426175143.128086-4-linux@treblig.org> (raw)
In-Reply-To: <20250426175143.128086-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
regulator_get_init_drvdata() was added in 2008 by the
commit a5766f11cfd3 ("regulator: core - Rework machine API to remove string
based functions.")
regulator_set_drvdata() was also added in 2008 by the
commit 414c70cb91c4 ("regulator: regulator framework core")
neither have been used since,
Remove them.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/regulator/core.c | 17 -----------------
include/linux/regulator/consumer.h | 6 ------
include/linux/regulator/driver.h | 1 -
3 files changed, 24 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 32e3919e37d2..60c72d77f77a 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -6096,17 +6096,6 @@ void *regulator_get_drvdata(struct regulator *regulator)
}
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
@@ -6131,12 +6120,6 @@ struct regmap *rdev_get_regmap(struct regulator_dev *rdev)
}
EXPORT_SYMBOL_GPL(rdev_get_regmap);
-void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data)
-{
- return reg_init_data->driver_data;
-}
-EXPORT_SYMBOL_GPL(regulator_get_init_drvdata);
-
#ifdef CONFIG_DEBUG_FS
static int supply_map_show(struct seq_file *sf, void *data)
{
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 999eba865c20..0e9275079e17 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -267,7 +267,6 @@ int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
/* driver data - core doesn't touch */
void *regulator_get_drvdata(struct regulator *regulator);
-void regulator_set_drvdata(struct regulator *regulator, void *data);
/* misc helpers */
@@ -633,11 +632,6 @@ 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;
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4a216fdba354..e849bab379f2 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -765,7 +765,6 @@ int regulator_set_active_discharge_regmap(struct regulator_dev *rdev,
int regulator_set_current_limit_regmap(struct regulator_dev *rdev,
int min_uA, int max_uA);
int regulator_get_current_limit_regmap(struct regulator_dev *rdev);
-void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
int regulator_find_closest_bigger(unsigned int target, const unsigned int *table,
unsigned int num_sel, unsigned int *sel);
int regulator_set_ramp_delay_regmap(struct regulator_dev *rdev, int ramp_delay);
--
2.49.0
next prev parent reply other threads:[~2025-04-26 17:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-26 17:51 [PATCH 0/5] Regulator deadcode cleanups linux
2025-04-26 17:51 ` [PATCH 1/5] regulator: devres: Remove unused devm_regulator_bulk_register_supply_alias linux
2025-04-26 17:51 ` [PATCH 2/5] regulator: core: Remove unused regulator_bulk_force_disable linux
2025-04-26 17:51 ` linux [this message]
2025-04-26 17:51 ` [PATCH 4/5] regulator: core: Remove unused regulator_suspend_(disable|enable) linux
2025-04-26 17:51 ` [PATCH 5/5] regulator: core: Remove unused regulator_set_suspend_voltage linux
2025-04-27 14:34 ` [PATCH 0/5] Regulator deadcode cleanups Mark Brown
2025-04-27 14:58 ` Dr. David Alan Gilbert
2025-04-30 23:18 ` Mark Brown
2025-05-01 0:03 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250426175143.128086-4-linux@treblig.org \
--to=linux@treblig.org \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=lgirdwood@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.