diff options
author | Tuomas Tynkkynen <ttynkkynen@nvidia.com> | 2014-07-21 18:38:47 +0300 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-25 18:29:28 +0100 |
commit | 8d7d3972a9ae962bbf8ce49c83f4a40082708f69 (patch) | |
tree | 07afde20ecc6fa6ab8a6e9372f44f2a0101a2191 /drivers/base | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) | |
download | linux-stable-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.tar.gz linux-stable-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.tar.bz2 linux-stable-8d7d3972a9ae962bbf8ce49c83f4a40082708f69.zip |
regmap: Add regmap_get_device
Add a new function regmap_get_device to obtain the underlying struct
device from a regmap.
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 74d8c0672cf6..5ba0263fce21 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1073,6 +1073,18 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name) } EXPORT_SYMBOL_GPL(dev_get_regmap); +/** + * regmap_get_device(): Obtain the device from a regmap + * + * @map: Register map to operate on. + * + * Returns the underlying device that the regmap has been created for. + */ +struct device *regmap_get_device(struct regmap *map) +{ + return map->dev; +} + static int _regmap_select_page(struct regmap *map, unsigned int *reg, struct regmap_range_node *range, unsigned int val_num) |