Merge pull request #224 from HinTak/suppress-fallthrough-warning
Suppress fallthrough warning
This commit is contained in:
commit
6b4133b5f0
3 changed files with 10 additions and 0 deletions
1
ac108.c
1
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 */
|
/* 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");
|
dev_dbg(dai->dev, "used as slave when AC101 is master\n");
|
||||||
}
|
}
|
||||||
|
fallthrough;
|
||||||
case SND_SOC_DAIFMT_CBS_CFS: /*AC108 Slave*/
|
case SND_SOC_DAIFMT_CBS_CFS: /*AC108 Slave*/
|
||||||
dev_dbg(dai->dev, "AC108 set to work as Slave\n");
|
dev_dbg(dai->dev, "AC108 set to work as Slave\n");
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
#define __NO_SND_SOC_CODEC_DRV 0
|
#define __NO_SND_SOC_CODEC_DRV 0
|
||||||
#endif
|
#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
|
#if __NO_SND_SOC_CODEC_DRV
|
||||||
#define codec component
|
#define codec component
|
||||||
#define snd_soc_codec snd_soc_component
|
#define snd_soc_codec snd_soc_component
|
||||||
|
|
1
wm8960.c
1
wm8960.c
|
@ -753,6 +753,7 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
|
||||||
iface |= 0x000c;
|
iface |= 0x000c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
dev_err(codec->dev, "unsupported width %d\n",
|
dev_err(codec->dev, "unsupported width %d\n",
|
||||||
params_width(params));
|
params_width(params));
|
||||||
|
|
Loading…
Reference in a new issue