Skip to contentSkip to conversation

Allow snd_soc_update_bits use 32 bits register

PATCH In review [email protected] 2 participants 2 messages Apr 6, 2014 – Apr 7, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow snd_soc_update_bits use 32 bits register

From: Bard Liao <[email protected]>

Change reg's type from unsigned short to unsigned int. So that we can use 32 bits reg value in snd_soc_update_bits.

---
 include/sound/soc.h  | 2 +-
 sound/soc/soc-core.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/sound/soc.h +1 -1
index 0b83168..687dec0 100644
@@ -469,7 +469,7 @@ static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
 #endif
 
 /* codec register bit access */
-int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
+int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned int reg,
 				unsigned int mask, unsigned int value);
 int snd_soc_update_bits_locked(struct snd_soc_codec *codec,
 			       unsigned short reg, unsigned int mask,
sound/soc/soc-core.c +1 -1
index caebd63..fde636c 100644
@@ -2316,7 +2316,7 @@ EXPORT_SYMBOL_GPL(snd_soc_write);
  *
  * Returns 1 for change, 0 for no change, or negative error code.
  */
-int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
+int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned int reg,
 				unsigned int mask, unsigned int value)
 {
 	bool change;
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer
#1 lore raw
Quoted 4 lines · On Sun, Apr 06, 2014 at 03:28:41PM +0800, [email protected] wrote:

From: Bard Liao <[email protected]>

Change reg's type from unsigned short to unsigned int. So that we can use 32 bits reg value in snd_soc_update_bits.

I've applied this since it's a move in the right direction but you've only done half the job - like I said previously you should be doing the same thing for _locked() too. Please also use subject lines appropraite for the subsystem and word wrap within paragraphs in your commit message.