public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas•com>
To: Mark Brown <broonie@kernel•org>
Cc: Stephen Rothwell <sfr@canb•auug.org.au>,
	Lee Jones <lee.jones@linaro•org>,
	Liam Girdwood <lgirdwood@gmail•com>,
	linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: [PATCH] regmap: replace regmap_write_bits()
Date: Thu, 3 Mar 2016 00:48:30 +0000	[thread overview]
Message-ID: <87h9gobdbk.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20160302040000.GX18327@sirena.org.uk>


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

commit 23b92e4cf5fd ("regmap: remove regmap_write_bits()")
removed regmap_write_bits(), but MFD driver was using it.
So, commit e30fccd6771d ("regmap: Keep regmap_write_bits()")
turns out it, but it is using original style.
This patch uses regmap_update_bits_base() for regmap_write_bits()

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

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index c7d4a63..3fb04c3 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2650,29 +2650,6 @@ int regmap_update_bits_base(struct regmap *map, unsigned int reg,
 }
 EXPORT_SYMBOL_GPL(regmap_update_bits_base);
 
-/**
- * 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 e0960b3..0744c9f 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -74,6 +74,9 @@ struct reg_sequence {
 #define	regmap_update_bits_check_async(map, reg, mask, val, change)\
 	regmap_update_bits_base(map, reg, mask, val, change, true, false)
 
+#define	regmap_write_bits(map, reg, mask, val) \
+	regmap_update_bits_base(map, reg, mask, val, NULL, false, true)
+
 #define	regmap_field_write(field, val) \
 	regmap_field_update_bits_base(field, ~0, val, NULL, false, false)
 #define	regmap_field_force_write(field, val) \
@@ -721,8 +724,6 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
 int regmap_update_bits_base(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);
@@ -961,13 +962,6 @@ static inline int regmap_update_bits_base(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_field_update_bits_base(struct regmap_field *field,
 					unsigned int mask, unsigned int val,
 					bool *change, bool async, bool force)
-- 
1.9.1

      reply	other threads:[~2016-03-03  0:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29  3:51 linux-next: build failure after merge of the mfd tree Stephen Rothwell
2016-03-01  1:19 ` Kuninori Morimoto
2016-03-01  1:35   ` Kuninori Morimoto
2016-03-02  4:00     ` Mark Brown
2016-03-03  0:48       ` Kuninori Morimoto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9gobdbk.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas$(echo .)com \
    --cc=broonie@kernel$(echo .)org \
    --cc=lee.jones@linaro$(echo .)org \
    --cc=lgirdwood@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox