From patchwork Tue Apr 4 17:19:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9662159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7349860364 for ; Tue, 4 Apr 2017 17:20:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CEAF2823D for ; Tue, 4 Apr 2017 17:20:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8152B284BA; Tue, 4 Apr 2017 17:20:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCC9E28491 for ; Tue, 4 Apr 2017 17:20:03 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D1D98266EEB; Tue, 4 Apr 2017 19:19:59 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C0CA6266EF1; Tue, 4 Apr 2017 19:19:58 +0200 (CEST) Received: from osg.samsung.com (ec2-52-27-115-49.us-west-2.compute.amazonaws.com [52.27.115.49]) by alsa0.perex.cz (Postfix) with ESMTP id 96536266834 for ; Tue, 4 Apr 2017 19:19:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 13DD9A05F1; Tue, 4 Apr 2017 17:20:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uIz4ppBF2-ah; Tue, 4 Apr 2017 17:20:16 +0000 (UTC) Received: from minerva.sisa.samsung.com (unknown [181.121.164.133]) by osg.samsung.com (Postfix) with ESMTPSA id 8F35FA05EF; Tue, 4 Apr 2017 17:20:12 +0000 (UTC) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Date: Tue, 4 Apr 2017 13:19:39 -0400 Message-Id: <20170404171939.3950-1-javier@osg.samsung.com> X-Mailer: git-send-email 2.9.3 Cc: alsa-devel@alsa-project.org, Kuninori Morimoto , Liam Girdwood , Vinod Koul , Takashi Iwai , Javier Martinez Canillas , Mark Brown , Enric Balletbo i Serra , Takashi Sakamoto Subject: [alsa-devel] [PATCH] ASoC: max9867: export OF device ID as module aliases X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. While there, move the MODULE_DEVICE_TABLE(i2c, max9867_i2c_id) just next to the I2C device table declaration, for consistency with other drivers. Before this patch: $ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias alias: i2c:max9867 After this patch: $ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias alias: i2c:max9867 alias: of:N*T*Cmaxim,max9867C* alias: of:N*T*Cmaxim,max9867 Signed-off-by: Javier Martinez Canillas --- sound/soc/codecs/max9867.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 6cdf15ab46de..0247edc9c84e 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -516,13 +516,13 @@ static const struct i2c_device_id max9867_i2c_id[] = { { "max9867", 0 }, { } }; +MODULE_DEVICE_TABLE(i2c, max9867_i2c_id); static const struct of_device_id max9867_of_match[] = { { .compatible = "maxim,max9867", }, { } }; - -MODULE_DEVICE_TABLE(i2c, max9867_i2c_id); +MODULE_DEVICE_TABLE(of, max9867_of_match); static const struct dev_pm_ops max9867_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(max9867_suspend, max9867_resume)