Skip to content

Commit

Permalink
regulator: core: Remove unused get_device_regulator
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Jun 27, 2012
1 parent 222cc7b commit bf2516c
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,6 @@ static const char *rdev_get_name(struct regulator_dev *rdev)
return "";
}

/* gets the regulator for a given consumer device */
static struct regulator *get_device_regulator(struct device *dev)
{
struct regulator *regulator = NULL;
struct regulator_dev *rdev;

mutex_lock(&regulator_list_mutex);
list_for_each_entry(rdev, &regulator_list, list) {
mutex_lock(&rdev->mutex);
list_for_each_entry(regulator, &rdev->consumer_list, list) {
if (regulator->dev == dev) {
mutex_unlock(&rdev->mutex);
mutex_unlock(&regulator_list_mutex);
return regulator;
}
}
mutex_unlock(&rdev->mutex);
}
mutex_unlock(&regulator_list_mutex);
return NULL;
}

/**
* of_get_regulator - get a regulator device node based on supply name
* @dev: Device pointer for the consumer (of regulator) device
Expand Down

0 comments on commit bf2516c

Please sign in to comment.