Skip to content

Commit

Permalink
compatibility - fallthrough' pseudo keyword was introduced in v5.4
Browse files Browse the repository at this point in the history
commit 294f69e662d1570703e9b56e95be37a9fd3afba5
Author: Joe Perches <[email protected]>
Date:   Sat Oct 5 09:46:42 2019 -0700

    compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use
  • Loading branch information
HinTak committed Apr 27, 2020
1 parent 74d65bf commit 0ed11aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound-compatible-4.18.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ed11aa

Please sign in to comment.