From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754751AbbIRUN6 (ORCPT ); Fri, 18 Sep 2015 16:13:58 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:33959 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754156AbbIRUMd (ORCPT ); Fri, 18 Sep 2015 16:12:33 -0400 From: "Cormier, Jonathan" To: Liam Girdwood Cc: Bob Duke , Mike Williamson , Mark Brown , Jaroslav Kysela , Takashi Iwai , Peter Ujfalusi , Jyri Sarha , Misael Lopez Cruz , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Greg Gluszek , "Cormier, Jonathan" Subject: [PATCH RFC 2/7] ASoC: tlv320aic26: Fix module autoload Date: Fri, 18 Sep 2015 16:11:11 -0400 Message-Id: <1442607076-26681-3-git-send-email-jcormier@criticallink.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442607076-26681-1-git-send-email-jcormier@criticallink.com> References: <1442607076-26681-1-git-send-email-jcormier@criticallink.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing MODULE_DEVICE_TABLE() for OF and SPI to export the information so modules have the correct aliases built-in and autoloading works correctly. A longer explanation by Javier Canillas can be found here: https://lkml.org/lkml/2015/7/30/519 https://lkml.org/lkml/2014/9/11/458 Signed-off-by: Cormier, Jonathan --- sound/soc/codecs/tlv320aic26.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 91fdd96648bd..91347727cfae 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -370,11 +370,18 @@ static int aic26_spi_remove(struct spi_device *spi) return 0; } +static const struct spi_device_id tlv320aic26_id_table[] = { + { "tlv320aic26" }, + {}, +}; +MODULE_DEVICE_TABLE(spi, tlv320aic26_id_table); + #if defined(CONFIG_OF) static const struct of_device_id tlv320aic26_of_match[] = { { .compatible = "ti,tlv320aic26", }, {}, }; +MODULE_DEVICE_TABLE(of, tlv320aic26_of_match); #endif static struct spi_driver aic26_spi = { @@ -387,6 +394,7 @@ static struct spi_driver aic26_spi = { }, .probe = aic26_spi_probe, .remove = aic26_spi_remove, + .id_table = tlv320aic26_id_table, }; module_spi_driver(aic26_spi); -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cormier, Jonathan" Subject: [PATCH RFC 2/7] ASoC: tlv320aic26: Fix module autoload Date: Fri, 18 Sep 2015 16:11:11 -0400 Message-ID: <1442607076-26681-3-git-send-email-jcormier@criticallink.com> References: <1442607076-26681-1-git-send-email-jcormier@criticallink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by alsa0.perex.cz (Postfix) with ESMTP id DF4F1265DFD for ; Fri, 18 Sep 2015 22:12:32 +0200 (CEST) Received: by qkap81 with SMTP id p81so24175017qka.2 for ; Fri, 18 Sep 2015 13:12:32 -0700 (PDT) In-Reply-To: <1442607076-26681-1-git-send-email-jcormier@criticallink.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Liam Girdwood Cc: "Cormier, Jonathan" , alsa-devel@alsa-project.org, Bob Duke , Mark Brown , linux-kernel@vger.kernel.org, Takashi Iwai , Jyri Sarha , Peter Ujfalusi , Mike Williamson , Greg Gluszek , Misael Lopez Cruz List-Id: alsa-devel@alsa-project.org Add the missing MODULE_DEVICE_TABLE() for OF and SPI to export the information so modules have the correct aliases built-in and autoloading works correctly. A longer explanation by Javier Canillas can be found here: https://lkml.org/lkml/2015/7/30/519 https://lkml.org/lkml/2014/9/11/458 Signed-off-by: Cormier, Jonathan --- sound/soc/codecs/tlv320aic26.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 91fdd96648bd..91347727cfae 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -370,11 +370,18 @@ static int aic26_spi_remove(struct spi_device *spi) return 0; } +static const struct spi_device_id tlv320aic26_id_table[] = { + { "tlv320aic26" }, + {}, +}; +MODULE_DEVICE_TABLE(spi, tlv320aic26_id_table); + #if defined(CONFIG_OF) static const struct of_device_id tlv320aic26_of_match[] = { { .compatible = "ti,tlv320aic26", }, {}, }; +MODULE_DEVICE_TABLE(of, tlv320aic26_of_match); #endif static struct spi_driver aic26_spi = { @@ -387,6 +394,7 @@ static struct spi_driver aic26_spi = { }, .probe = aic26_spi_probe, .remove = aic26_spi_remove, + .id_table = tlv320aic26_id_table, }; module_spi_driver(aic26_spi); -- 1.9.1