Skip to content

Commit 6cf3e3c

Browse files
arndbpull[bot]
authored andcommitted
ASoC: Intel: sof-nau8825: fix module alias overflow
The maximum name length for a platform_device_id entry is 20 characters including the trailing NUL byte. The sof_nau8825.c file exceeds that, which causes an obscure error message: sound/soc/intel/boards/snd-soc-sof_nau8825.mod.c:35:45: error: illegal character encoding in string literal [-Werror,-Winvalid-source-encoding] MODULE_ALIAS("platform:adl_max98373_nau8825<U+0018><AA>"); ^~~~ include/linux/module.h:168:49: note: expanded from macro 'MODULE_ALIAS' ^~~~~~ include/linux/module.h:165:56: note: expanded from macro 'MODULE_INFO' ^~~~ include/linux/moduleparam.h:26:47: note: expanded from macro '__MODULE_INFO' = __MODULE_INFO_PREFIX __stringify(tag) "=" info I could not figure out how to make the module handling robust enough to handle this better, but as a quick fix, using slightly shorter names that are still unique avoids the build issue. Fixes: 8d0872f ("ASoC: Intel: add sof-nau8825 machine driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20221221132515.2363276-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d7d0461 commit 6cf3e3c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sound/soc/intel/boards/sof_nau8825.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,15 +631,15 @@ static const struct platform_device_id board_ids[] = {
631631

632632
},
633633
{
634-
.name = "adl_rt1019p_nau8825",
634+
.name = "adl_rt1019p_8825",
635635
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
636636
SOF_SPEAKER_AMP_PRESENT |
637637
SOF_RT1019P_SPEAKER_AMP_PRESENT |
638638
SOF_NAU8825_SSP_AMP(2) |
639639
SOF_NAU8825_NUM_HDMIDEV(4)),
640640
},
641641
{
642-
.name = "adl_max98373_nau8825",
642+
.name = "adl_max98373_8825",
643643
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
644644
SOF_SPEAKER_AMP_PRESENT |
645645
SOF_MAX98373_SPEAKER_AMP_PRESENT |
@@ -650,7 +650,7 @@ static const struct platform_device_id board_ids[] = {
650650
},
651651
{
652652
/* The limitation of length of char array, shorten the name */
653-
.name = "adl_mx98360a_nau8825",
653+
.name = "adl_mx98360a_8825",
654654
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
655655
SOF_SPEAKER_AMP_PRESENT |
656656
SOF_MAX98360A_SPEAKER_AMP_PRESENT |
@@ -661,7 +661,7 @@ static const struct platform_device_id board_ids[] = {
661661

662662
},
663663
{
664-
.name = "adl_rt1015p_nau8825",
664+
.name = "adl_rt1015p_8825",
665665
.driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) |
666666
SOF_SPEAKER_AMP_PRESENT |
667667
SOF_RT1015P_SPEAKER_AMP_PRESENT |

sound/soc/intel/common/soc-acpi-intel-adl-match.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,21 +479,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
479479
},
480480
{
481481
.id = "10508825",
482-
.drv_name = "adl_rt1019p_nau8825",
482+
.drv_name = "adl_rt1019p_8825",
483483
.machine_quirk = snd_soc_acpi_codec_list,
484484
.quirk_data = &adl_rt1019p_amp,
485485
.sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg",
486486
},
487487
{
488488
.id = "10508825",
489-
.drv_name = "adl_max98373_nau8825",
489+
.drv_name = "adl_max98373_8825",
490490
.machine_quirk = snd_soc_acpi_codec_list,
491491
.quirk_data = &adl_max98373_amp,
492492
.sof_tplg_filename = "sof-adl-max98373-nau8825.tplg",
493493
},
494494
{
495495
.id = "10508825",
496-
.drv_name = "adl_mx98360a_nau8825",
496+
.drv_name = "adl_mx98360a_8825",
497497
.machine_quirk = snd_soc_acpi_codec_list,
498498
.quirk_data = &adl_max98360a_amp,
499499
.sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg",
@@ -507,7 +507,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
507507
},
508508
{
509509
.id = "10508825",
510-
.drv_name = "adl_rt1015p_nau8825",
510+
.drv_name = "adl_rt1015p_8825",
511511
.machine_quirk = snd_soc_acpi_codec_list,
512512
.quirk_data = &adl_rt1015p_amp,
513513
.sof_tplg_filename = "sof-adl-rt1015-nau8825.tplg",

0 commit comments

Comments
 (0)