diff --git a/ac108.c b/ac108.c index cd20547..8c09143 100644 --- a/ac108.c +++ b/ac108.c @@ -865,6 +865,7 @@ static int ac108_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { /* TODO: Both cpu_dai and codec_dai(AC108) be set as slave in DTS */ dev_dbg(dai->dev, "used as slave when AC101 is master\n"); } + fallthrough; case SND_SOC_DAIFMT_CBS_CFS: /*AC108 Slave*/ dev_dbg(dai->dev, "AC108 set to work as Slave\n"); /** diff --git a/sound-compatible-4.18.h b/sound-compatible-4.18.h index dc5a787..faed848 100644 --- a/sound-compatible-4.18.h +++ b/sound-compatible-4.18.h @@ -15,6 +15,14 @@ #define __NO_SND_SOC_CODEC_DRV 0 #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) +#if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +#else +# define fallthrough do {} while (0) /* fallthrough */ +#endif +#endif + #if __NO_SND_SOC_CODEC_DRV #define codec component #define snd_soc_codec snd_soc_component diff --git a/wm8960.c b/wm8960.c index f26f59b..34d4dad 100644 --- a/wm8960.c +++ b/wm8960.c @@ -753,6 +753,7 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, iface |= 0x000c; break; } + fallthrough; default: dev_err(codec->dev, "unsupported width %d\n", params_width(params));