linux/sound/pci/aw2
Arnd Bergmann 022a13a1db ALSA: aw2: avoid casting function pointers
clang-16 started warning about incompatible function pointers here:

sound/pci/aw2/aw2-alsa.c:363:11: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  363 |                                                     (snd_aw2_saa7146_it_cb)
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~
  364 |                                                     snd_pcm_period_elapsed,
      |                                                     ~~~~~~~~~~~~~~~~~~~~~~
sound/pci/aw2/aw2-alsa.c:392:10: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
  392 |                                                    (snd_aw2_saa7146_it_cb)
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~
  393 |                                                    snd_pcm_period_elapsed,
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~

Add a forward declaration for struct snd_pcm_substrea to allow it to just
use the correct prototype.

Fixes: 98f2a97f20 ("[ALSA] Emagic Audiowerk 2 ALSA driver.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240213101327.460191-1-arnd@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-02-13 14:22:42 +01:00
..
aw2-alsa.c ALSA: aw2: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:38 +02:00
aw2-saa7146.c ALSA: pci/aw2-saa7146: remove 'set but not used' warning 2020-07-07 12:05:14 +02:00
aw2-saa7146.h ALSA: aw2: avoid casting function pointers 2024-02-13 14:22:42 +01:00
aw2-tsl.c ALSA: aw2: More constifications 2020-01-05 16:15:06 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
saa7146.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 456 2019-06-19 17:09:09 +02:00