Skip to content

Commit

Permalink
ALSA: pcm: Nuke snd_pcm_lib_mmap_vmalloc()
Browse files Browse the repository at this point in the history
snd_pcm_lib_mmap_vmalloc() was supposed to be implemented with
somewhat special for vmalloc handling, but in the end, this turned to
just the default handler, i.e. NULL.  As the situation has never
changed over decades, let's rip it off.

Reviewed-by: Takashi Sakamoto <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jul 18, 2018
1 parent ef4db23 commit fa84cf0
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion drivers/staging/most/sound/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ static const struct snd_pcm_ops pcm_ops = {
.trigger = pcm_trigger,
.pointer = pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static int split_arg_list(char *buf, char **card_name, u16 *ch_num,
Expand Down
2 changes: 0 additions & 2 deletions include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1342,8 +1342,6 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif

#define snd_pcm_lib_mmap_vmalloc NULL

/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
Expand Down
1 change: 0 additions & 1 deletion sound/drivers/aloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ static const struct snd_pcm_ops loopback_pcm_ops = {
.trigger = loopback_trigger,
.pointer = loopback_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static int loopback_pcm_new(struct loopback *loopback,
Expand Down
2 changes: 0 additions & 2 deletions sound/drivers/vx/vx_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,6 @@ static const struct snd_pcm_ops vx_pcm_playback_ops = {
.trigger = vx_pcm_trigger,
.pointer = vx_pcm_playback_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};


Expand Down Expand Up @@ -1105,7 +1104,6 @@ static const struct snd_pcm_ops vx_pcm_capture_ops = {
.trigger = vx_pcm_trigger,
.pointer = vx_pcm_capture_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};


Expand Down
1 change: 0 additions & 1 deletion sound/firewire/bebob/bebob_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ int snd_bebob_create_pcm_devices(struct snd_bebob *bebob)
.pointer = pcm_playback_pointer,
.ack = pcm_playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
2 changes: 0 additions & 2 deletions sound/firewire/dice/dice-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ int snd_dice_create_pcm(struct snd_dice *dice)
.pointer = capture_pointer,
.ack = capture_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
static const struct snd_pcm_ops playback_ops = {
.open = pcm_open,
Expand All @@ -425,7 +424,6 @@ int snd_dice_create_pcm(struct snd_dice *dice)
.pointer = playback_pointer,
.ack = playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
unsigned int capture, playback;
Expand Down
1 change: 0 additions & 1 deletion sound/firewire/digi00x/digi00x-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ int snd_dg00x_create_pcm_devices(struct snd_dg00x *dg00x)
.pointer = pcm_playback_pointer,
.ack = pcm_playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
1 change: 0 additions & 1 deletion sound/firewire/fireface/ff-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ int snd_ff_create_pcm_devices(struct snd_ff *ff)
.pointer = pcm_playback_pointer,
.ack = pcm_playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
1 change: 0 additions & 1 deletion sound/firewire/fireworks/fireworks_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ int snd_efw_create_pcm_devices(struct snd_efw *efw)
.pointer = pcm_playback_pointer,
.ack = pcm_playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
1 change: 0 additions & 1 deletion sound/firewire/isight.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ static int isight_create_pcm(struct isight *isight)
.trigger = isight_trigger,
.pointer = isight_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
2 changes: 0 additions & 2 deletions sound/firewire/motu/motu-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ int snd_motu_create_pcm_devices(struct snd_motu *motu)
.pointer = capture_pointer,
.ack = capture_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
static const struct snd_pcm_ops playback_ops = {
.open = pcm_open,
Expand All @@ -376,7 +375,6 @@ int snd_motu_create_pcm_devices(struct snd_motu *motu)
.pointer = playback_pointer,
.ack = playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
2 changes: 0 additions & 2 deletions sound/firewire/oxfw/oxfw-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ int snd_oxfw_create_pcm(struct snd_oxfw *oxfw)
.pointer = pcm_capture_pointer,
.ack = pcm_capture_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
static const struct snd_pcm_ops playback_ops = {
.open = pcm_open,
Expand All @@ -402,7 +401,6 @@ int snd_oxfw_create_pcm(struct snd_oxfw *oxfw)
.pointer = pcm_playback_pointer,
.ack = pcm_playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
unsigned int cap = 0;
Expand Down
1 change: 0 additions & 1 deletion sound/firewire/tascam/tascam-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ int snd_tscm_create_pcm_devices(struct snd_tscm *tscm)
.pointer = pcm_playback_pointer,
.ack = pcm_playback_ack,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};
struct snd_pcm *pcm;
int err;
Expand Down
3 changes: 0 additions & 3 deletions sound/mips/sgio2audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ static const struct snd_pcm_ops snd_sgio2audio_playback1_ops = {
.trigger = snd_sgio2audio_pcm_trigger,
.pointer = snd_sgio2audio_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static const struct snd_pcm_ops snd_sgio2audio_playback2_ops = {
Expand All @@ -698,7 +697,6 @@ static const struct snd_pcm_ops snd_sgio2audio_playback2_ops = {
.trigger = snd_sgio2audio_pcm_trigger,
.pointer = snd_sgio2audio_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static const struct snd_pcm_ops snd_sgio2audio_capture_ops = {
Expand All @@ -711,7 +709,6 @@ static const struct snd_pcm_ops snd_sgio2audio_capture_ops = {
.trigger = snd_sgio2audio_pcm_trigger,
.pointer = snd_sgio2audio_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

/*
Expand Down
1 change: 0 additions & 1 deletion sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ static const struct snd_pcm_ops pdacf_pcm_capture_ops = {
.trigger = pdacf_pcm_trigger,
.pointer = pdacf_pcm_capture_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};


Expand Down
1 change: 0 additions & 1 deletion sound/soc/codecs/rt5514-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ static const struct snd_pcm_ops rt5514_spi_pcm_ops = {
.hw_params = rt5514_spi_hw_params,
.hw_free = rt5514_spi_hw_free,
.pointer = rt5514_spi_pcm_pointer,
.mmap = snd_pcm_lib_mmap_vmalloc,
.page = snd_pcm_lib_get_vmalloc_page,
};

Expand Down
1 change: 0 additions & 1 deletion sound/usb/6fire/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ static const struct snd_pcm_ops pcm_ops = {
.trigger = usb6fire_pcm_trigger,
.pointer = usb6fire_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static void usb6fire_pcm_init_urb(struct pcm_urb *urb,
Expand Down
1 change: 0 additions & 1 deletion sound/usb/caiaq/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ static const struct snd_pcm_ops snd_usb_caiaq_ops = {
.trigger = snd_usb_caiaq_pcm_trigger,
.pointer = snd_usb_caiaq_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static void check_for_elapsed_periods(struct snd_usb_caiaqdev *cdev,
Expand Down
1 change: 0 additions & 1 deletion sound/usb/hiface/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ static const struct snd_pcm_ops pcm_ops = {
.trigger = hiface_pcm_trigger,
.pointer = hiface_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static int hiface_pcm_init_urb(struct pcm_urb *urb,
Expand Down
2 changes: 0 additions & 2 deletions sound/usb/misc/ua101.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,6 @@ static const struct snd_pcm_ops capture_pcm_ops = {
.trigger = capture_pcm_trigger,
.pointer = capture_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static const struct snd_pcm_ops playback_pcm_ops = {
Expand All @@ -913,7 +912,6 @@ static const struct snd_pcm_ops playback_pcm_ops = {
.trigger = playback_pcm_trigger,
.pointer = playback_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static const struct uac_format_type_i_discrete_descriptor *
Expand Down
2 changes: 0 additions & 2 deletions sound/usb/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,6 @@ static const struct snd_pcm_ops snd_usb_playback_ops = {
.trigger = snd_usb_substream_playback_trigger,
.pointer = snd_usb_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static const struct snd_pcm_ops snd_usb_capture_ops = {
Expand All @@ -1707,7 +1706,6 @@ static const struct snd_pcm_ops snd_usb_capture_ops = {
.trigger = snd_usb_substream_capture_trigger,
.pointer = snd_usb_pcm_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static const struct snd_pcm_ops snd_usb_playback_dev_ops = {
Expand Down

0 comments on commit fa84cf0

Please sign in to comment.