Skip to content

Commit bf2516c

Browse files
Fabio Estevambroonie
authored andcommitted
regulator: core: Remove unused get_device_regulator
commit 222cc7b (regulator: core: Allow multiple requests of a single supply mapping) removed the usage of get_device_regulator(). Remove the function definition too amd get rid of the following warning: drivers/regulator/core.c:112:26: warning: 'get_device_regulator' defined but not used [-Wunused-function] Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 222cc7b commit bf2516c

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎drivers/regulator/core.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -108,28 +108,6 @@ static const char *rdev_get_name(struct regulator_dev *rdev)
108108
return "";
109109
}
110110

111-
/* gets the regulator for a given consumer device */
112-
static struct regulator *get_device_regulator(struct device *dev)
113-
{
114-
struct regulator *regulator = NULL;
115-
struct regulator_dev *rdev;
116-
117-
mutex_lock(&regulator_list_mutex);
118-
list_for_each_entry(rdev, &regulator_list, list) {
119-
mutex_lock(&rdev->mutex);
120-
list_for_each_entry(regulator, &rdev->consumer_list, list) {
121-
if (regulator->dev == dev) {
122-
mutex_unlock(&rdev->mutex);
123-
mutex_unlock(&regulator_list_mutex);
124-
return regulator;
125-
}
126-
}
127-
mutex_unlock(&rdev->mutex);
128-
}
129-
mutex_unlock(&regulator_list_mutex);
130-
return NULL;
131-
}
132-
133111
/**
134112
* of_get_regulator - get a regulator device node based on supply name
135113
* @dev: Device pointer for the consumer (of regulator) device

0 commit comments

Comments
 (0)