ALSA: msnd: Add missing __iomem annotations

The io-mapped buffers used in msnd drivers need __iomem annotations.

This fixes sparse warnings like:
  sound/isa/msnd/msnd_pinnacle.c:172:45: warning: incorrect type in initializer (different address spaces)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2018-07-25 23:00:47 +02:00
parent bd1cd0eb2c
commit ab647a2d62
4 changed files with 12 additions and 12 deletions

View File

@ -54,7 +54,7 @@
#define LOGNAME "msnd" #define LOGNAME "msnd"
void snd_msnd_init_queue(void *base, int start, int size) void snd_msnd_init_queue(void __iomem *base, int start, int size)
{ {
writew(PCTODSP_BASED(start), base + JQS_wStart); writew(PCTODSP_BASED(start), base + JQS_wStart);
writew(PCTODSP_OFFSET(size) - 1, base + JQS_wSize); writew(PCTODSP_OFFSET(size) - 1, base + JQS_wSize);
@ -270,7 +270,7 @@ int snd_msnd_DARQ(struct snd_msnd *chip, int bank)
udelay(1); udelay(1);
if (chip->capturePeriods == 2) { if (chip->capturePeriods == 2) {
void *pDAQ = chip->mappedbase + DARQ_DATA_BUFF + void __iomem *pDAQ = chip->mappedbase + DARQ_DATA_BUFF +
bank * DAQDS__size + DAQDS_wStart; bank * DAQDS__size + DAQDS_wStart;
unsigned short offset = 0x3000 + chip->capturePeriodBytes; unsigned short offset = 0x3000 + chip->capturePeriodBytes;
@ -309,7 +309,7 @@ int snd_msnd_DAPQ(struct snd_msnd *chip, int start)
{ {
u16 DAPQ_tail; u16 DAPQ_tail;
int protect = start, nbanks = 0; int protect = start, nbanks = 0;
void *DAQD; void __iomem *DAQD;
static int play_banks_submitted; static int play_banks_submitted;
/* unsigned long flags; /* unsigned long flags;
spin_lock_irqsave(&chip->lock, flags); not necessary */ spin_lock_irqsave(&chip->lock, flags); not necessary */
@ -370,7 +370,7 @@ static void snd_msnd_play_reset_queue(struct snd_msnd *chip,
unsigned int pcm_count) unsigned int pcm_count)
{ {
int n; int n;
void *pDAQ = chip->mappedbase + DAPQ_DATA_BUFF; void __iomem *pDAQ = chip->mappedbase + DAPQ_DATA_BUFF;
chip->last_playbank = -1; chip->last_playbank = -1;
chip->playLimit = pcm_count * (pcm_periods - 1); chip->playLimit = pcm_count * (pcm_periods - 1);
@ -398,7 +398,7 @@ static void snd_msnd_capture_reset_queue(struct snd_msnd *chip,
unsigned int pcm_count) unsigned int pcm_count)
{ {
int n; int n;
void *pDAQ; void __iomem *pDAQ;
/* unsigned long flags; */ /* unsigned long flags; */
/* snd_msnd_init_queue(chip->DARQ, DARQ_DATA_BUFF, DARQ_BUFF_SIZE); */ /* snd_msnd_init_queue(chip->DARQ, DARQ_DATA_BUFF, DARQ_BUFF_SIZE); */
@ -485,7 +485,7 @@ static int snd_msnd_playback_open(struct snd_pcm_substream *substream)
clear_bit(F_WRITING, &chip->flags); clear_bit(F_WRITING, &chip->flags);
snd_msnd_enable_irq(chip); snd_msnd_enable_irq(chip);
runtime->dma_area = chip->mappedbase; runtime->dma_area = (__force void *)chip->mappedbase;
runtime->dma_bytes = 0x3000; runtime->dma_bytes = 0x3000;
chip->playback_substream = substream; chip->playback_substream = substream;
@ -508,7 +508,7 @@ static int snd_msnd_playback_hw_params(struct snd_pcm_substream *substream,
{ {
int i; int i;
struct snd_msnd *chip = snd_pcm_substream_chip(substream); struct snd_msnd *chip = snd_pcm_substream_chip(substream);
void *pDAQ = chip->mappedbase + DAPQ_DATA_BUFF; void __iomem *pDAQ = chip->mappedbase + DAPQ_DATA_BUFF;
chip->play_sample_size = snd_pcm_format_width(params_format(params)); chip->play_sample_size = snd_pcm_format_width(params_format(params));
chip->play_channels = params_channels(params); chip->play_channels = params_channels(params);
@ -589,7 +589,7 @@ static int snd_msnd_capture_open(struct snd_pcm_substream *substream)
set_bit(F_AUDIO_READ_INUSE, &chip->flags); set_bit(F_AUDIO_READ_INUSE, &chip->flags);
snd_msnd_enable_irq(chip); snd_msnd_enable_irq(chip);
runtime->dma_area = chip->mappedbase + 0x3000; runtime->dma_area = (__force void *)chip->mappedbase + 0x3000;
runtime->dma_bytes = 0x3000; runtime->dma_bytes = 0x3000;
memset(runtime->dma_area, 0, runtime->dma_bytes); memset(runtime->dma_area, 0, runtime->dma_bytes);
chip->capture_substream = substream; chip->capture_substream = substream;
@ -654,7 +654,7 @@ static int snd_msnd_capture_hw_params(struct snd_pcm_substream *substream,
{ {
int i; int i;
struct snd_msnd *chip = snd_pcm_substream_chip(substream); struct snd_msnd *chip = snd_pcm_substream_chip(substream);
void *pDAQ = chip->mappedbase + DARQ_DATA_BUFF; void __iomem *pDAQ = chip->mappedbase + DARQ_DATA_BUFF;
chip->capture_sample_size = snd_pcm_format_width(params_format(params)); chip->capture_sample_size = snd_pcm_format_width(params_format(params));
chip->capture_channels = params_channels(params); chip->capture_channels = params_channels(params);

View File

@ -283,7 +283,7 @@ struct snd_msnd {
}; };
void snd_msnd_init_queue(void *base, int start, int size); void snd_msnd_init_queue(void __iomem *base, int start, int size);
int snd_msnd_send_dsp_cmd(struct snd_msnd *chip, u8 cmd); int snd_msnd_send_dsp_cmd(struct snd_msnd *chip, u8 cmd);
int snd_msnd_send_word(struct snd_msnd *chip, int snd_msnd_send_word(struct snd_msnd *chip,

View File

@ -119,7 +119,7 @@ void snd_msndmidi_input_read(void *mpuv)
{ {
unsigned long flags; unsigned long flags;
struct snd_msndmidi *mpu = mpuv; struct snd_msndmidi *mpu = mpuv;
void *pwMIDQData = mpu->dev->mappedbase + MIDQ_DATA_BUFF; void __iomem *pwMIDQData = mpu->dev->mappedbase + MIDQ_DATA_BUFF;
u16 head, tail, size; u16 head, tail, size;
spin_lock_irqsave(&mpu->input_lock, flags); spin_lock_irqsave(&mpu->input_lock, flags);

View File

@ -169,7 +169,7 @@ static void snd_msnd_eval_dsp_msg(struct snd_msnd *chip, u16 wMessage)
static irqreturn_t snd_msnd_interrupt(int irq, void *dev_id) static irqreturn_t snd_msnd_interrupt(int irq, void *dev_id)
{ {
struct snd_msnd *chip = dev_id; struct snd_msnd *chip = dev_id;
void *pwDSPQData = chip->mappedbase + DSPQ_DATA_BUFF; void __iomem *pwDSPQData = chip->mappedbase + DSPQ_DATA_BUFF;
u16 head, tail, size; u16 head, tail, size;
/* Send ack to DSP */ /* Send ack to DSP */