Skip to content

Commit

Permalink
sound: phytium: fix phytium_i2s.c on 6.9
Browse files Browse the repository at this point in the history
Declare multiple functions as static functions to suppress warnings about
missing prototypes.

Signed-off-by: Mingcong Bai <[email protected]>
  • Loading branch information
MingcongBai committed Jul 2, 2024
1 parent 5d9651e commit c2c40d2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sound/soc/phytium/phytium_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void stream_update(struct i2sc_bus *bus, struct i2s_stream *s)
}
}

int snd_i2s_bus_handle_stream_irq(struct i2sc_bus *bus, unsigned int status,
static int snd_i2s_bus_handle_stream_irq(struct i2sc_bus *bus, unsigned int status,
void (*ack)(struct i2sc_bus *, struct i2s_stream *))
{
struct i2s_stream *azx_dev;
Expand All @@ -121,7 +121,7 @@ int snd_i2s_bus_handle_stream_irq(struct i2sc_bus *bus, unsigned int status,
return handled;
}

irqreturn_t azx_i2s_interrupt(int irq, void *dev_id)
static irqreturn_t azx_i2s_interrupt(int irq, void *dev_id)
{
struct azx *chip = dev_id;
struct i2sc_bus *bus = azx_bus(chip);
Expand Down Expand Up @@ -430,7 +430,7 @@ static const struct snd_pcm_hardware phytium_pcm_hardware = {
.fifo_size = 16,
};

struct i2s_stream *snd_i2s_stream_assign(struct i2sc_bus *bus,
static struct i2s_stream *snd_i2s_stream_assign(struct i2sc_bus *bus,
struct snd_pcm_substream *substream)
{
struct i2s_stream *azx_dev;
Expand Down Expand Up @@ -618,7 +618,7 @@ static int setup_bdle(struct i2sc_bus *bus,
return ofs;
}

int snd_i2s_stream_setup_periods(struct i2s_stream *azx_dev)
static int snd_i2s_stream_setup_periods(struct i2s_stream *azx_dev)
{
struct i2sc_bus *bus = azx_dev->bus;
struct snd_pcm_substream *substream = azx_dev->substream;
Expand Down Expand Up @@ -686,7 +686,7 @@ int snd_i2s_stream_setup_periods(struct i2s_stream *azx_dev)
return -EINVAL;
}

int snd_i2s_stream_set_params(struct i2s_stream *azx_dev,
static int snd_i2s_stream_set_params(struct i2s_stream *azx_dev,
unsigned int format_val)
{
unsigned int bufsize, period_bytes;
Expand Down Expand Up @@ -714,7 +714,7 @@ int snd_i2s_stream_set_params(struct i2s_stream *azx_dev,
return 0;
}

int snd_i2s_stream_setup(struct i2s_stream *azx_dev, int pcie, u32 paddr)
static int snd_i2s_stream_setup(struct i2s_stream *azx_dev, int pcie, u32 paddr)
{
struct snd_pcm_runtime *runtime;

Expand Down Expand Up @@ -800,7 +800,7 @@ static int phytium_pcm_prepare(struct snd_soc_component *component,
return err;
}

void snd_i2s_stream_clear(struct i2s_stream *azx_dev)
static void snd_i2s_stream_clear(struct i2s_stream *azx_dev)
{
if (azx_dev->direction == SNDRV_PCM_STREAM_PLAYBACK)
i2s_write_reg(azx_dev->sd_addr, DMA_CHALX_CTL(1), 0x0);
Expand All @@ -810,12 +810,12 @@ void snd_i2s_stream_clear(struct i2s_stream *azx_dev)
azx_dev->running = false;
}

void snd_i2s_stream_stop(struct i2s_stream *azx_dev)
static void snd_i2s_stream_stop(struct i2s_stream *azx_dev)
{
snd_i2s_stream_clear(azx_dev);
}

void snd_i2s_stream_start(struct i2s_stream *azx_dev, bool fresh_start)
static void snd_i2s_stream_start(struct i2s_stream *azx_dev, bool fresh_start)
{
if (azx_dev->direction == SNDRV_PCM_STREAM_PLAYBACK)
i2s_write_reg(azx_dev->sd_addr, DMA_CHALX_CTL(1), 0x1);
Expand Down Expand Up @@ -882,7 +882,7 @@ static int phytium_pcm_trigger(struct snd_soc_component *component,
return 0;
}

void snd_i2s_stream_cleanup(struct i2s_stream *azx_dev)
static void snd_i2s_stream_cleanup(struct i2s_stream *azx_dev)
{
int cnt = 10;
u32 mask;
Expand Down Expand Up @@ -1069,7 +1069,7 @@ static int phytium_i2s_dma_alloc_pages(struct i2sc_bus *bus, int type, size_t si
return 0;
}

int snd_i2s_bus_alloc_stream_pages(struct i2sc_bus *bus)
static int snd_i2s_bus_alloc_stream_pages(struct i2sc_bus *bus)
{
struct i2s_stream *s;
int num_streams = 0;
Expand Down Expand Up @@ -1105,7 +1105,7 @@ static int stream_direction(struct azx *chip, unsigned char index)
return SNDRV_PCM_STREAM_CAPTURE;
}

void snd_i2s_stream_init(struct i2sc_bus *bus, struct i2s_stream *azx_dev,
static void snd_i2s_stream_init(struct i2sc_bus *bus, struct i2s_stream *azx_dev,
int idx, int direction, int tag)
{
azx_dev->bus = bus;
Expand All @@ -1123,7 +1123,7 @@ void snd_i2s_stream_init(struct i2sc_bus *bus, struct i2s_stream *azx_dev,
list_add_tail(&azx_dev->list, &bus->stream_list);
}

int azx_i2s_init_streams(struct azx *chip)
static int azx_i2s_init_streams(struct azx *chip)
{
int i;

Expand Down Expand Up @@ -1221,7 +1221,7 @@ static void azx_probe_work(struct work_struct *work)
azx_probe_continue(&i2s->chip);
}

int azx_i2s_bus_init(struct azx *chip,
static int azx_i2s_bus_init(struct azx *chip,
const struct i2s_io_ops *io_ops)
{
struct i2s_bus *bus = &chip->bus;
Expand Down

0 comments on commit c2c40d2

Please sign in to comment.