OSDN Git Service

ALSA: asihpi: Drop superfluous ioctl PCM ops
authorTakashi Iwai <tiwai@suse.de>
Tue, 10 Dec 2019 06:11:35 +0000 (07:11 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 11 Dec 2019 06:25:30 +0000 (07:25 +0100)
snd_card_asihpi_playback_ioctl() and snd_card_asihpi_capture_ioctl()
do nothing but calling the default handler.
Now PCM core accepts NULL as the default ioctl ops(*), so let's drop
altogether.

(*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops")

Link: https://lore.kernel.org/r/20191210061145.24641-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/asihpi.c

index ccdaaf2..1fdb9f9 100644 (file)
@@ -943,15 +943,6 @@ static void snd_card_asihpi_isr(struct hpi_adapter *a)
 }
 
 /***************************** PLAYBACK OPS ****************/
-static int snd_card_asihpi_playback_ioctl(struct snd_pcm_substream *substream,
-                                         unsigned int cmd, void *arg)
-{
-       char name[16];
-       snd_pcm_debug_name(substream, name, sizeof(name));
-       snd_printddd(KERN_INFO "%s ioctl %d\n", name, cmd);
-       return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
 static int snd_card_asihpi_playback_prepare(struct snd_pcm_substream *
                                            substream)
 {
@@ -1118,7 +1109,6 @@ static int snd_card_asihpi_playback_close(struct snd_pcm_substream *substream)
 static const struct snd_pcm_ops snd_card_asihpi_playback_mmap_ops = {
        .open = snd_card_asihpi_playback_open,
        .close = snd_card_asihpi_playback_close,
-       .ioctl = snd_card_asihpi_playback_ioctl,
        .hw_params = snd_card_asihpi_pcm_hw_params,
        .hw_free = snd_card_asihpi_hw_free,
        .prepare = snd_card_asihpi_playback_prepare,
@@ -1143,12 +1133,6 @@ snd_card_asihpi_capture_pointer(struct snd_pcm_substream *substream)
        return bytes_to_frames(runtime, dpcm->pcm_buf_dma_ofs % dpcm->buffer_bytes);
 }
 
-static int snd_card_asihpi_capture_ioctl(struct snd_pcm_substream *substream,
-                                        unsigned int cmd, void *arg)
-{
-       return snd_pcm_lib_ioctl(substream, cmd, arg);
-}
-
 static int snd_card_asihpi_capture_prepare(struct snd_pcm_substream *substream)
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
@@ -1284,7 +1268,6 @@ static int snd_card_asihpi_capture_close(struct snd_pcm_substream *substream)
 static const struct snd_pcm_ops snd_card_asihpi_capture_mmap_ops = {
        .open = snd_card_asihpi_capture_open,
        .close = snd_card_asihpi_capture_close,
-       .ioctl = snd_card_asihpi_capture_ioctl,
        .hw_params = snd_card_asihpi_pcm_hw_params,
        .hw_free = snd_card_asihpi_hw_free,
        .prepare = snd_card_asihpi_capture_prepare,