summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-08-04 18:19:57 +0200
committerMark Brown <broonie@linaro.org>2014-08-04 18:19:57 +0200
commite8b15c01732e74e29cad144c667bfb8792ef69fc (patch)
treeb6a26368cd4d6ee665771b99231fe66abec25277 /drivers/base
parentLinux 3.16 (diff)
parentregmap: Fix return code for stub regmap_get_device() (diff)
downloadlinux-e8b15c01732e74e29cad144c667bfb8792ef69fc.tar.xz
linux-e8b15c01732e74e29cad144c667bfb8792ef69fc.zip
Merge remote-tracking branch 'regmap/topic/getdev' into regmap-next
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 74d8c0672cf6..78f43fb2fe84 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1073,6 +1073,19 @@ 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;
+}
+EXPORT_SYMBOL_GPL(regmap_get_device);
+
static int _regmap_select_page(struct regmap *map, unsigned int *reg,
struct regmap_range_node *range,
unsigned int val_num)