11 Apr
2018
11 Apr
'18
6:34 p.m.
On Wed, Apr 11, 2018 at 11:20:10AM -0500, Pierre-Louis Bossart wrote:
+static char glk_spk_dai_name[10]; +static char glk_hs_dai_name[10];
Off-by-one? "SSPx-Codec" would be 11 chars if you include null termination.
Or avoid needing global statics entirely...
static int broxton_audio_probe(struct platform_device *pdev) { struct bxt_card_private *ctx;
- int dai_index = 8;
maybe better to do an explicit search that hard-code values? This will actually not work if you have an additional FE for headset on GLK, or you are assuming a dependency on a patch added later in the series - not good.
Definitely, this is just a recipe for fragility.