Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2719710rwb; Thu, 29 Sep 2022 14:09:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Uhp6jXg87jqIbNxY7RR8yCjF9rjBDIvW/ufisC+jLWo5q4lXqnllfTR/mQ/uxNnmPgYov X-Received: by 2002:a05:6402:4503:b0:457:e6ac:9785 with SMTP id ez3-20020a056402450300b00457e6ac9785mr5026097edb.416.1664485785633; Thu, 29 Sep 2022 14:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664485785; cv=none; d=google.com; s=arc-20160816; b=V475icbLoGZNM0vjZOCPSPgKaWWwUkOaXpoFFPNTotYuW3IdZK5UMM2kLM7TF3ZvBO 4VZZrS/v0o4uD6bsc6si4rWDkRtQmyC/CFKX4vsp4GWljYYMQtY3UUVMSeif36yuHAhS 5uMKaavbd18yEspIwMrf4f9TycbrRVltv4o1BX378ejiD7ZkER963hKjAEVaDVFtwloP t/4eUnXycW9zYbA5AZPkv0fkdsm1okEK+RHZ9vA5NhHRQgxBstFCpj2Koozg6AU/3Zul LQ+lrbeHGPfO2VW7ihXQGfwA2gQpWERr679rk20n+EXUVzn7O1rMdrhQuv59udZjNDOU nLog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Myj5pwXBiOBl/Oheah/8nv6JWAVMZ8REC2QxU47plLY=; b=XW4uTPc2h5Tadb+I7DvmZw0jFIbQw+YzuPaSmxJqhrV5b9pzxuu/c9BBnWCVcxiyu2 rjFnq7+MgwucZO8BDXUofYLHoAFeBCfpkqEjc5jqeHMO0J8KijyUzuhfRxChTHqdDYKQ ECur1HSDlAFTimeDJLcbFiWHY4XbGjYRbkgf3vMqCir1FY9ivet4XvGzo13k0I36aAwc K8WYN9cbts0mSPqjuIB0VSgFS2F3ciE7tDcTUwVr7DFLQj0URiVbdVi+XBs5UYAnoALY meDwJJjLtslV+mVzgO1gCGqda9st0bXit7Zfm6jQBf7l64LZspiPYAP4+O/Pa5J9mAVo 4JcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="I/90rkr6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a170906525200b00782987c675asi167790ejm.932.2022.09.29.14.09.19; Thu, 29 Sep 2022 14:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="I/90rkr6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229503AbiI2UzJ (ORCPT + 99 others); Thu, 29 Sep 2022 16:55:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiI2UzF (ORCPT ); Thu, 29 Sep 2022 16:55:05 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DA77237F7 for ; Thu, 29 Sep 2022 13:55:01 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 022D566022C0; Thu, 29 Sep 2022 21:54:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1664484899; bh=u8vd513Z6iUQllRWnPPQC4Zl83VQH1gtqG8/V8QUGJY=; h=From:To:Cc:Subject:Date:From; b=I/90rkr6oP3p4/r66yBm0/dLpFtqmvwZowTrJZa7HwvaxaDCOTd7hVQ6WN5moCpuG kSnOh59WkOk3oAzHztGOC7GkcU0OTbhRcLlor3GABI+J7TpimDAtBr13pqXkDgE3xe QRcnkGpWhOpbHYZjSPohsLAKI3I7VWkWYmpduoNX6z2FKlbYM8kLL/Ffr8jU39XnLl uoVmuvbBDymYkNUgDLMfrm3AbgLbiFSWl46yCPajy7LDNRMMzC1MJRlIWCPX1z9KlI A0DNr8d+0l9LIHQ2HDuJJlFvwh0oAmjdfeGqwSs3nZeH8BcemKMHQ5w6siipsFbF8R fNXFXrYqZFYrg== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Mark Brown Cc: kernel@collabora.com, Jaroslav Kysela , AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Akihiko Odaki , Jiaxin Yu , Liam Girdwood , Matthias Brugger , Miaoqian Lin , Takashi Iwai , Tzung-Bi Shih , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH] ASoC: mediatek: mt8192-mt6359: Set the driver name for the card Date: Thu, 29 Sep 2022 16:54:53 -0400 Message-Id: <20220929205453.1144142-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ASoC core automatically populates the driver name field in the card from the card name if left unset. However, since the driver name can be at most 16 characters long, wrapping will happen if the card name is longer, which is the case for the mt8192-mt6359 driver. Explicitly set the driver name for the card in order to avoid said wrapping and have a readable driver name exposed to userspace. Signed-off-by: NĂ­colas F. R. A. Prado --- Issue noticed while upstreaming the UCM file for this driver [1]. [1] https://github.com/alsa-project/alsa-ucm-conf/pull/217 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index ff40ccd36f7e..b93c3237ef2d 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -24,6 +24,8 @@ #include "mt8192-afe-clk.h" #include "mt8192-afe-gpio.h" +#define DRIVER_NAME "mt8192_mt6359" + #define RT1015_CODEC_DAI "rt1015-aif" #define RT1015_DEV0_NAME "rt1015.1-0028" #define RT1015_DEV1_NAME "rt1015.1-0029" @@ -1070,6 +1072,7 @@ static struct snd_soc_codec_conf rt1015_amp_conf[] = { static struct snd_soc_card mt8192_mt6359_rt1015_rt5682_card = { .name = RT1015_RT5682_CARD_NAME, + .driver_name = DRIVER_NAME, .owner = THIS_MODULE, .dai_link = mt8192_mt6359_dai_links, .num_links = ARRAY_SIZE(mt8192_mt6359_dai_links), @@ -1105,6 +1108,7 @@ static const struct snd_kcontrol_new mt8192_mt6359_rt1015p_rt5682x_controls[] = }; static struct snd_soc_card mt8192_mt6359_rt1015p_rt5682x_card = { + .driver_name = DRIVER_NAME, .owner = THIS_MODULE, .dai_link = mt8192_mt6359_dai_links, .num_links = ARRAY_SIZE(mt8192_mt6359_dai_links), @@ -1266,7 +1270,7 @@ static const struct dev_pm_ops mt8192_mt6359_pm_ops = { static struct platform_driver mt8192_mt6359_driver = { .driver = { - .name = "mt8192_mt6359", + .name = DRIVER_NAME, #ifdef CONFIG_OF .of_match_table = mt8192_mt6359_dt_match, #endif -- 2.37.3