From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE9A9C433B4 for ; Wed, 12 May 2021 14:52:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7AE3C61413 for ; Wed, 12 May 2021 14:52:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231423AbhELOx6 (ORCPT ); Wed, 12 May 2021 10:53:58 -0400 Received: from mga07.intel.com ([134.134.136.100]:11241 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231162AbhELOxz (ORCPT ); Wed, 12 May 2021 10:53:55 -0400 IronPort-SDR: BJltbjT1RMvl7Mv6aTLtmU91NkbBubwJCy+QYeRRsBInk5pyf3V/nRsqQiqgUyHOcvHC5sC7bL N/CjJvNQcpRw== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="263650806" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="263650806" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 07:52:46 -0700 IronPort-SDR: cA6Zs510rHgQ6GkS8D4I8JMdHFHQypk/xImYgpETYmwZqd5kFXM15Z5wxzVPeZQ9aidlivSjlH DTsE4qIgJrvA== X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="437236918" Received: from cwitkows-mobl.amr.corp.intel.com (HELO [10.212.100.147]) ([10.212.100.147]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 07:52:44 -0700 Subject: Re: [PATCH -next] ASoC: intel/boards: add missing MODULE_DEVICE_TABLE To: Zou Wei , cezary.rojewski@intel.com, liam.r.girdwood@linux.intel.com, yang.jie@linux.intel.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, kuninori.morimoto.gx@renesas.com, kai.vehmanen@linux.intel.com, brent.lu@intel.com, ranjani.sridharan@linux.intel.com, yong.zhi@intel.com, dharageswari.r@intel.com, sathyanarayana.nujella@intel.com, fred.oh@linux.intel.com, tzungbi@google.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <1620791647-16024-1-git-send-email-zou_wei@huawei.com> From: Pierre-Louis Bossart Message-ID: <50fa973b-aa9f-ccb4-8020-9d38a63e2c30@linux.intel.com> Date: Wed, 12 May 2021 08:41:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1620791647-16024-1-git-send-email-zou_wei@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/11/21 10:54 PM, Zou Wei wrote: > This patch adds missing MODULE_DEVICE_TABLE definition which generates > correct modalias for automatic loading of this driver when it is built > as an external module. I have a limited understanding of all this, but we already support the machine drivers as modules and things work fine. I wonder if this MODULE_DEVICE_TABLE generates the alias automatically, which would make the existing ones added manually at the end of the files unnecessary? If that was the case, then we should remove those MODULE_ALIAS as well, no? MODULE_DESCRIPTION("SOF Audio Machine driver"); MODULE_AUTHOR("Bard Liao "); MODULE_AUTHOR("Sathya Prakash M R "); MODULE_AUTHOR("Brent Lu "); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:sof_rt5682"); MODULE_ALIAS("platform:tgl_max98357a_rt5682"); MODULE_ALIAS("platform:jsl_rt5682_rt1015"); MODULE_ALIAS("platform:tgl_max98373_rt5682"); MODULE_ALIAS("platform:jsl_rt5682_max98360a"); MODULE_ALIAS("platform:cml_rt1015_rt5682"); MODULE_ALIAS("platform:tgl_rt1011_rt5682"); MODULE_ALIAS("platform:jsl_rt5682_rt1015p"); > > Reported-by: Hulk Robot > Signed-off-by: Zou Wei > --- > sound/soc/intel/boards/sof_da7219_max98373.c | 1 + > sound/soc/intel/boards/sof_rt5682.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/sound/soc/intel/boards/sof_da7219_max98373.c b/sound/soc/intel/boards/sof_da7219_max98373.c > index f3cb077..8d1ad89 100644 > --- a/sound/soc/intel/boards/sof_da7219_max98373.c > +++ b/sound/soc/intel/boards/sof_da7219_max98373.c > @@ -440,6 +440,7 @@ static const struct platform_device_id board_ids[] = { > }, > { } > }; > +MODULE_DEVICE_TABLE(platform, board_ids); > > static struct platform_driver audio = { > .probe = audio_probe, > diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c > index 58548ea..cf1d053 100644 > --- a/sound/soc/intel/boards/sof_rt5682.c > +++ b/sound/soc/intel/boards/sof_rt5682.c > @@ -968,6 +968,7 @@ static const struct platform_device_id board_ids[] = { > }, > { } > }; > +MODULE_DEVICE_TABLE(platform, board_ids); > > static struct platform_driver sof_audio = { > .probe = sof_audio_probe, >