diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-30 14:56:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-30 16:06:43 -0500 |
commit | c0eb46766d395da8d62148bda2e59bad5e6ee2f2 (patch) | |
tree | 9b808ba04041f4f10d08b384b4ad8c608a86df4c /include | |
parent | 567e47935a7cddd8e823c73bb8ee0b2805cd4940 (diff) |
regmap: Implement managed regmap_init()
Save error handling and unwinding code in drivers by providing managed
versions of the regmap init functions, simplifying usage.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index eb93921cdd30..195db51ec79b 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -127,6 +127,14 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c, | |||
127 | struct regmap *regmap_init_spi(struct spi_device *dev, | 127 | struct regmap *regmap_init_spi(struct spi_device *dev, |
128 | const struct regmap_config *config); | 128 | const struct regmap_config *config); |
129 | 129 | ||
130 | struct regmap *devm_regmap_init(struct device *dev, | ||
131 | const struct regmap_bus *bus, | ||
132 | const struct regmap_config *config); | ||
133 | struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c, | ||
134 | const struct regmap_config *config); | ||
135 | struct regmap *devm_regmap_init_spi(struct spi_device *dev, | ||
136 | const struct regmap_config *config); | ||
137 | |||
130 | void regmap_exit(struct regmap *map); | 138 | void regmap_exit(struct regmap *map); |
131 | int regmap_reinit_cache(struct regmap *map, | 139 | int regmap_reinit_cache(struct regmap *map, |
132 | const struct regmap_config *config); | 140 | const struct regmap_config *config); |