ALSA: pcm: Nuke snd_pcm_lib_mmap_vmalloc()
authorTakashi Iwai <tiwai@suse.de>
Wed, 18 Jul 2018 05:40:53 +0000 (07:40 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 18 Jul 2018 06:24:29 +0000 (08:24 +0200)
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 <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
21 files changed:
drivers/staging/most/sound/sound.c
include/sound/pcm.h
sound/drivers/aloop.c
sound/drivers/vx/vx_pcm.c
sound/firewire/bebob/bebob_pcm.c
sound/firewire/dice/dice-pcm.c
sound/firewire/digi00x/digi00x-pcm.c
sound/firewire/fireface/ff-pcm.c
sound/firewire/fireworks/fireworks_pcm.c
sound/firewire/isight.c
sound/firewire/motu/motu-pcm.c
sound/firewire/oxfw/oxfw-pcm.c
sound/firewire/tascam/tascam-pcm.c
sound/mips/sgio2audio.c
sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
sound/soc/codecs/rt5514-spi.c
sound/usb/6fire/pcm.c
sound/usb/caiaq/audio.c
sound/usb/hiface/pcm.c
sound/usb/misc/ua101.c
sound/usb/pcm.c

index 04c1832..89b02fc 100644 (file)
@@ -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,
index fcdf358..1206045 100644 (file)
@@ -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
index 78a2fdc..1e34e63 100644 (file)
@@ -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,
index 380a028..ba80f45 100644 (file)
@@ -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,
 };
 
 
@@ -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,
 };
 
 
index e6adab3..ea9b864 100644 (file)
@@ -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;
index 80351b2..bb3ef5f 100644 (file)
@@ -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,
@@ -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;
index 796f4b4..fdcff04 100644 (file)
@@ -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;
index e3c1630..bf47f9e 100644 (file)
@@ -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;
index 40faed5..aed566d 100644 (file)
@@ -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;
index 3919e18..3095747 100644 (file)
@@ -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;
index 4330220..ab69d7e 100644 (file)
@@ -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,
@@ -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;
index 3dd4628..b3f6503 100644 (file)
@@ -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,
@@ -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;
index 6ec8ec6..e4cc899 100644 (file)
@@ -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;
index 9fb68b3..3ec9391 100644 (file)
@@ -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 = {
@@ -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 = {
@@ -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,
 };
 
 /*
index 4a2354b..98a6863 100644 (file)
@@ -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,
 };
 
 
index 18686ff..6478d10 100644 (file)
@@ -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,
 };
 
index 2dd2518..f8ef3e2 100644 (file)
@@ -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,
index 15344d3..c6108a3 100644 (file)
@@ -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,
index 396c317..e1fbb9c 100644 (file)
@@ -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,
index 386fbfd..a0b6d03 100644 (file)
@@ -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 = {
@@ -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 *
index 160f52c..4b930fa 100644 (file)
@@ -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 = {
@@ -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 = {