From patchwork Tue May 17 16:00:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9114141 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8FA60BF29F for ; Tue, 17 May 2016 16:01:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF31C2025A for ; Tue, 17 May 2016 16:01:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E4D9D2022D for ; Tue, 17 May 2016 16:01:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BCD63265DFE; Tue, 17 May 2016 18:01:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A07F2265B6C; Tue, 17 May 2016 18:01:05 +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 960E6265CDB; Tue, 17 May 2016 18:01:04 +0200 (CEST) Received: from lists.s-osg.org (lists.s-osg.org [54.187.51.154]) by alsa0.perex.cz (Postfix) with ESMTP id 4AE07265A55 for ; Tue, 17 May 2016 18:00:57 +0200 (CEST) Received: from minerva.sisa.samsung.com (host-68.58.217.201.copaco.com.py [201.217.58.68]) by lists.s-osg.org (Postfix) with ESMTPSA id C137CE269A; Tue, 17 May 2016 09:01:14 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Date: Tue, 17 May 2016 12:00:09 -0400 Message-Id: <1463500829-9723-1-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.5.5 Cc: alsa-devel@alsa-project.org, kbuild test robot , Anatol Pomozov , Javier Martinez Canillas , "Yang A\"" , Liam Girdwood , John Hsu , Takashi Iwai , Kieran Bingham , Mark Brown , Ben Zhang , Yong Zhi Subject: [alsa-devel] [PATCH] ASoC: nau8825: Export I2C module alias information 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 driver has an i2c_device_id array but that information isn't exported to the module using the MODULE_DEVICE_TABLE() macro. So the module autoloading won't work if the I2C device is registered using OF or legacy board files due missing alias information in the module. The issue was found using Kieran Bingham's coccinelle semantic patch: https://lkml.org/lkml/2016/5/10/520 Signed-off-by: Javier Martinez Canillas --- sound/soc/codecs/nau8825.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 81fc97b07751..e988f89ef715 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1493,6 +1493,7 @@ static const struct i2c_device_id nau8825_i2c_ids[] = { { "nau8825", 0 }, { } }; +MODULE_DEVICE_TABLE(i2c, nau8825_i2c_ids); #ifdef CONFIG_OF static const struct of_device_id nau8825_of_ids[] = {