summaryrefslogtreecommitdiffstats
path: root/sound/pci/lola/lola_pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 23:24:06 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-27 09:06:05 +0200
commit0d9a26fc74578289e0edeac36c6d562596f8a72e (patch)
tree3276b83b79b46b04697d3fe479966c455a140aba /sound/pci/lola/lola_pcm.c
parent0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e (diff)
downloadtalos-op-linux-0d9a26fc74578289e0edeac36c6d562596f8a72e.tar.gz
talos-op-linux-0d9a26fc74578289e0edeac36c6d562596f8a72e.zip
ALSA: lola: Proper endian notations
The BDL entries in lola driver are little-endian while we code them as u32. This leads to sparse warnings like: sound/pci/lola/lola.c:105:40: warning: incorrect type in assignment (different base types) sound/pci/lola/lola.c:105:40: expected unsigned int [unsigned] [usertype] <noident> sound/pci/lola/lola.c:105:40: got restricted __le32 [usertype] <noident> This patch fixes the declarations to the proper __le32 type. Also, there was a typo in the original code, where __user was used that was intended as __iomem. This was caused also by sparse: sound/pci/lola/lola_mixer.c:132:27: warning: incorrect type in assignment (different address spaces) Fixed in this patch as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/lola/lola_pcm.c')
-rw-r--r--sound/pci/lola/lola_pcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/lola/lola_pcm.c b/sound/pci/lola/lola_pcm.c
index 310b26a756c9..e70276c3ea20 100644
--- a/sound/pci/lola/lola_pcm.c
+++ b/sound/pci/lola/lola_pcm.c
@@ -316,10 +316,10 @@ static int lola_pcm_hw_free(struct snd_pcm_substream *substream)
* set up a BDL entry
*/
static int setup_bdle(struct snd_pcm_substream *substream,
- struct lola_stream *str, u32 **bdlp,
+ struct lola_stream *str, __le32 **bdlp,
int ofs, int size)
{
- u32 *bdl = *bdlp;
+ __le32 *bdl = *bdlp;
while (size > 0) {
dma_addr_t addr;
@@ -355,14 +355,14 @@ static int lola_setup_periods(struct lola *chip, struct lola_pcm *pcm,
struct snd_pcm_substream *substream,
struct lola_stream *str)
{
- u32 *bdl;
+ __le32 *bdl;
int i, ofs, periods, period_bytes;
period_bytes = str->period_bytes;
periods = str->bufsize / period_bytes;
/* program the initial BDL entries */
- bdl = (u32 *)(pcm->bdl.area + LOLA_BDL_ENTRY_SIZE * str->index);
+ bdl = (__le32 *)(pcm->bdl.area + LOLA_BDL_ENTRY_SIZE * str->index);
ofs = 0;
str->frags = 0;
for (i = 0; i < periods; i++) {
OpenPOWER on IntegriCloud