summaryrefslogtreecommitdiffstats
path: root/sound/pci/intel8x0m.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 17:24:08 -0400
committerTakashi Iwai <tiwai@suse.de>2018-07-27 03:06:07 -0400
commit7752a7de2596097c8f702fd652cba05118f83bcc (patch)
tree94e285f1ca6573add31f9fe85f8be5eb73699d5a /sound/pci/intel8x0m.c
parent3c164e2ce601bd7abf76d9f37b7f4afa6fa988a1 (diff)
ALSA: intel8x0m: Proper endian notations
The BD address tables in intel8x0m driver are in little-endian, hence they should be represented as __le32 instead u32. Spotted by sparse, warnings like: sound/pci/intel8x0m.c:406:40: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/intel8x0m.c')
-rw-r--r--sound/pci/intel8x0m.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index 3a4769a97d29..943a726b1c1b 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -168,7 +168,7 @@ enum { ALID_MDMIN, ALID_MDMOUT, ALID_MDMLAST = ALID_MDMOUT };
168struct ichdev { 168struct ichdev {
169 unsigned int ichd; /* ich device number */ 169 unsigned int ichd; /* ich device number */
170 unsigned long reg_offset; /* offset to bmaddr */ 170 unsigned long reg_offset; /* offset to bmaddr */
171 u32 *bdbar; /* CPU address (32bit) */ 171 __le32 *bdbar; /* CPU address (32bit) */
172 unsigned int bdbar_addr; /* PCI bus address (32bit) */ 172 unsigned int bdbar_addr; /* PCI bus address (32bit) */
173 struct snd_pcm_substream *substream; 173 struct snd_pcm_substream *substream;
174 unsigned int physbuf; /* physical address (32bit) */ 174 unsigned int physbuf; /* physical address (32bit) */
@@ -395,7 +395,7 @@ static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97,
395static void snd_intel8x0m_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev) 395static void snd_intel8x0m_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev)
396{ 396{
397 int idx; 397 int idx;
398 u32 *bdbar = ichdev->bdbar; 398 __le32 *bdbar = ichdev->bdbar;
399 unsigned long port = ichdev->reg_offset; 399 unsigned long port = ichdev->reg_offset;
400 400
401 iputdword(chip, port + ICH_REG_OFF_BDBAR, ichdev->bdbar_addr); 401 iputdword(chip, port + ICH_REG_OFF_BDBAR, ichdev->bdbar_addr);
@@ -1217,7 +1217,7 @@ static int snd_intel8x0m_create(struct snd_card *card,
1217 int_sta_masks = 0; 1217 int_sta_masks = 0;
1218 for (i = 0; i < chip->bdbars_count; i++) { 1218 for (i = 0; i < chip->bdbars_count; i++) {
1219 ichdev = &chip->ichd[i]; 1219 ichdev = &chip->ichd[i];
1220 ichdev->bdbar = ((u32 *)chip->bdbars.area) + (i * ICH_MAX_FRAGS * 2); 1220 ichdev->bdbar = ((__le32 *)chip->bdbars.area) + (i * ICH_MAX_FRAGS * 2);
1221 ichdev->bdbar_addr = chip->bdbars.addr + (i * sizeof(u32) * ICH_MAX_FRAGS * 2); 1221 ichdev->bdbar_addr = chip->bdbars.addr + (i * sizeof(u32) * ICH_MAX_FRAGS * 2);
1222 int_sta_masks |= ichdev->int_sta_mask; 1222 int_sta_masks |= ichdev->int_sta_mask;
1223 } 1223 }