summaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/echoaudio_gml.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 23:24:10 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-27 09:06:09 +0200
commit2a833a02a12b1dbb605739d589d11b4400c2078c (patch)
treee05711f7f6f779550072cc2c4f20f772d92e2a25 /sound/pci/echoaudio/echoaudio_gml.c
parentALSA: maestro3: Proper endian notations (diff)
downloadlinux-2a833a02a12b1dbb605739d589d11b4400c2078c.tar.xz
linux-2a833a02a12b1dbb605739d589d11b4400c2078c.zip
ALSA: echoaudio: Proper endian notations
Many data fields defined in echoaudio drivers are in little-endian, hence they should be defined with __le16 or __le32. This makes it easier to catch the forgotten conversions. Spotted by sparse, a warning like: sound/pci/echoaudio/echoaudio_dsp.c:990:36: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio/echoaudio_gml.c')
-rw-r--r--sound/pci/echoaudio/echoaudio_gml.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/echoaudio/echoaudio_gml.c b/sound/pci/echoaudio/echoaudio_gml.c
index 834b39e97db7..eea6fe530ab4 100644
--- a/sound/pci/echoaudio/echoaudio_gml.c
+++ b/sound/pci/echoaudio/echoaudio_gml.c
@@ -63,6 +63,8 @@ the control register. write_control_reg sends the new control register
value to the DSP. */
static int write_control_reg(struct echoaudio *chip, u32 value, char force)
{
+ __le32 reg_value;
+
/* Handle the digital input auto-mute */
if (chip->digital_in_automute)
value |= GML_DIGITAL_IN_AUTO_MUTE;
@@ -72,11 +74,11 @@ static int write_control_reg(struct echoaudio *chip, u32 value, char force)
dev_dbg(chip->card->dev, "write_control_reg: 0x%x\n", value);
/* Write the control register */
- value = cpu_to_le32(value);
- if (value != chip->comm_page->control_register || force) {
+ reg_value = cpu_to_le32(value);
+ if (reg_value != chip->comm_page->control_register || force) {
if (wait_handshake(chip))
return -EIO;
- chip->comm_page->control_register = value;
+ chip->comm_page->control_register = reg_value;
clear_handshake(chip);
return send_vector(chip, DSP_VC_WRITE_CONTROL_REG);
}