[alsa-devel] [PATCH 6/7][RFC] regmpa: remove regmap_write_bits()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Feb 10 03:46:23 CET 2016


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

We can use _force_ write by regmap_raw_update_bits() option.
Let's remove unused regmap_write_bits()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 drivers/base/regmap/regmap.c | 23 -----------------------
 include/linux/regmap.h       |  9 ---------
 2 files changed, 32 deletions(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 1b5c6e2..289a10e 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2682,29 +2682,6 @@ int regmap_raw_update_bits(struct regmap *map, unsigned int reg,
 }
 EXPORT_SYMBOL_GPL(regmap_raw_update_bits);
 
-/**
- * regmap_write_bits: Perform a read/modify/write cycle on the register map
- *
- * @map: Register map to update
- * @reg: Register to update
- * @mask: Bitmask to change
- * @val: New value for bitmask
- *
- * Returns zero for success, a negative number on error.
- */
-int regmap_write_bits(struct regmap *map, unsigned int reg,
-		      unsigned int mask, unsigned int val)
-{
-	int ret;
-
-	map->lock(map->lock_arg);
-	ret = _regmap_update_bits(map, reg, mask, val, NULL, true);
-	map->unlock(map->lock_arg);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(regmap_write_bits);
-
 void regmap_async_complete_cb(struct regmap_async *async, int ret)
 {
 	struct regmap *map = async->map;
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index eebee95..7724c21 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -721,8 +721,6 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
 int regmap_raw_update_bits(struct regmap *map, unsigned int reg,
 			   unsigned int mask, unsigned int val,
 			   bool *change, bool async, bool force);
-int regmap_write_bits(struct regmap *map, unsigned int reg,
-		       unsigned int mask, unsigned int val);
 int regmap_get_val_bytes(struct regmap *map);
 int regmap_get_max_register(struct regmap *map);
 int regmap_get_reg_stride(struct regmap *map);
@@ -966,13 +964,6 @@ static inline int regmap_raw_update_bits(struct regmap *map, unsigned int reg,
 	return -EINVAL;
 }
 
-static inline int regmap_write_bits(struct regmap *map, unsigned int reg,
-				     unsigned int mask, unsigned int val)
-{
-	WARN_ONCE(1, "regmap API is disabled");
-	return -EINVAL;
-}
-
 static inline int regmap_get_val_bytes(struct regmap *map)
 {
 	WARN_ONCE(1, "regmap API is disabled");
-- 
1.9.1



More information about the Alsa-devel mailing list