From patchwork Tue Oct 3 09:49:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dechesne X-Patchwork-Id: 114674 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1674281qgn; Tue, 3 Oct 2017 02:50:06 -0700 (PDT) X-Received: by 10.99.120.202 with SMTP id t193mr15347163pgc.419.1507024206629; Tue, 03 Oct 2017 02:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507024206; cv=none; d=google.com; s=arc-20160816; b=TqrLnKR+HvRK9R6BLsqkvFTT5Av121sy0Hn00Cnc8gKP/Azw8rTT1TOZV+sAqA6wkK iAzCOYlH8btJMavCfabPwpMeGYPc7fsKpaHhUOOMOCaIaQ8ifV4KnqxBe/DqpDnut0+u IhfMssz+FPLtu5Cf5T9yj3MyRRN5z83iGeizdtzhJLAyDPcZZwLuWBJpCFYcG/5vTku7 9Tk3UQfHnOmr+rvlrmwWFIiey+B9pvk5mZveZIRfi7JeIGGKzY6cDLsyPZ2XCHMiGbiP iLqsGW5iuOLx0g1Lmo3KIUsapH26hDa/V3UoyQopaAelrS9kF/2YhiBfXnmA2wvyXFvw Qjzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=2PxppLnL1ALP0QMvt0XsNN2DNAnIHgsST1cVXgTnDdc=; b=ALp5MNc0lcbxkfLyqnXD5yNXzcmUou93dpwboixQXZb+XwjS4MPazlxpXW5amjXqHP RUa3Fsdpuk7KB0Vrm7oowjFqvqhxQXpbo0ou2XaP2Xe8cAWhXnelyGDkXMk3OwSkErEX 0kCF8SBLYzyAy25sE6gfPb3Styd5hW/9WfMWaTDdyHVwj0YBzHaakZpdOQD/j/tJ2Y0c L4no6WP7Cap1Q0KOmxk1CHWWcMKKt859E9uDFLeGd4gBfF+Fov3Glx3V1Ub2GLVcVWmr SlKd8oDnD+fn31wDj6DmtCPnGl3rTwF5g+q4CmK0rIpwxot1H/rkDrb4r4MCK+FFDi7Q vQuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAY+vwkW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b68si4309019pga.182.2017.10.03.02.50.06; Tue, 03 Oct 2017 02:50:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAY+vwkW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751604AbdJCJuD (ORCPT + 26 others); Tue, 3 Oct 2017 05:50:03 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:50499 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbdJCJuC (ORCPT ); Tue, 3 Oct 2017 05:50:02 -0400 Received: by mail-wm0-f45.google.com with SMTP id u138so15399827wmu.5 for ; Tue, 03 Oct 2017 02:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=2PxppLnL1ALP0QMvt0XsNN2DNAnIHgsST1cVXgTnDdc=; b=AAY+vwkW4UoO/hkjwFWAegdzaAE+0TLuFc1A4fIVdLcJEeP1zn4+k5DXFEJWM2g9Aq jPgBG8yGcIWtcFig3Gxak9RxfKfqSSOI/X6mMe6jAosPxi15VYaMdDFQNIbLnbIhiUJZ cffbuiFpiAWQgMWzP3uzL9b9noCYK5enJTuDY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2PxppLnL1ALP0QMvt0XsNN2DNAnIHgsST1cVXgTnDdc=; b=Dx89MB4l0R/GwGlcwng0438TRjYvu5cKLVC8IAHO3HEEL9BtlNYaLoPaB73MZhUk06 aunfuLbwtx4g2iCyN5bO6fBgrOheVjY3/0hrEdXcWLhT7cQhnesD5uBSYQsNokkDh/W/ 6HwPN7L6+NYmpxiAdGd95QnAbEGYa0Ocg7k5+h6bVjOW/BiYkENOz1Kfwsg+KBYh1qY3 ZCyzWhaXc5d2FwxZglDvUI0qKqAu9EP+9FMSOpgRTWgJZvX+wSSGJHzd+KJpADA8CNew WomPDqj5Z/zzfwxNUHaEO6A66y2j/PI5hG87ftV2hwx47a3J0mbOI3d/oQ+XVvFoau0g Wmvg== X-Gm-Message-State: AHPjjUiehxbY+2i+JTgxZ+VAdFndY2pU5BAW7czKlWkWUF6ax79MLyoc dM79KzMhOSWjwY4HM8BWG2BlrA== X-Google-Smtp-Source: AOwi7QBFpWFICcxsajAwNqxn57p55IEmf2kjuX+TKTGXpQWtl7atPyAo3deQBA6Egg0w2X2Nh+cSmQ== X-Received: by 10.28.236.25 with SMTP id k25mr14140066wmh.146.1507024201396; Tue, 03 Oct 2017 02:50:01 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id k126sm24231021wmd.1.2017.10.03.02.50.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Oct 2017 02:50:00 -0700 (PDT) From: Nicolas Dechesne To: Mark Brown , alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , srinivas.kandagatla@linaro.org, Nicolas Dechesne Subject: [PATCH] ASoC: codecs: msm8916-wcd-analog: fix module autoload Date: Tue, 3 Oct 2017 11:49:51 +0200 Message-Id: <20171003094951.10692-1-nicolas.dechesne@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo snd_soc_msm8916_analog | grep alias $ After this patch: $ modinfo snd_soc_msm8916_analog | grep alias alias: of:N*T*Cqcom,pm8916-wcd-analog-codecC* alias: of:N*T*Cqcom,pm8916-wcd-analog-codec Signed-off-by: Nicolas Dechesne --- sound/soc/codecs/msm8916-wcd-analog.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 Acked-by: Srinivas Kandagatla diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index 549c269acc7d..d79e5b35e003 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -1241,6 +1241,8 @@ static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = { { } }; +MODULE_DEVICE_TABLE(of, pm8916_wcd_analog_spmi_match_table); + static struct platform_driver pm8916_wcd_analog_spmi_driver = { .driver = { .name = "qcom,pm8916-wcd-spmi-codec",