[alsa-devel] [PATCH] Allow snd_soc_update_bits use 32 bits register
From: Bard Liao bardliao@realtek.com
Change reg's type from unsigned short to unsigned int. So that we can use 32 bits reg value in snd_soc_update_bits.
Signed-off-by: Bard Liao bardliao@realtek.com --- include/sound/soc.h | 2 +- sound/soc/soc-core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index 0b83168..687dec0 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -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, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index caebd63..fde636c 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -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;
On Sun, Apr 06, 2014 at 03:28:41PM +0800, bardliao@realtek.com wrote:
From: Bard Liao bardliao@realtek.com
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.
participants (2)
-
bardliao@realtek.com
-
Mark Brown