From patchwork Tue Oct 21 03:30:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Zhang X-Patchwork-Id: 5108921 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6D7C69F349 for ; Tue, 21 Oct 2014 03:31:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4CA4201DD for ; Tue, 21 Oct 2014 03:31:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7C40B201D3 for ; Tue, 21 Oct 2014 03:31:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B83512612BC; Tue, 21 Oct 2014 05:31:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 852262610A1; Tue, 21 Oct 2014 05:31:07 +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 0630D2610B5; Tue, 21 Oct 2014 05:31:05 +0200 (CEST) Received: from mail-pa0-f74.google.com (mail-pa0-f74.google.com [209.85.220.74]) by alsa0.perex.cz (Postfix) with ESMTP id A931D2608BC for ; Tue, 21 Oct 2014 05:30:57 +0200 (CEST) Received: by mail-pa0-f74.google.com with SMTP id kq14so70288pab.3 for ; Mon, 20 Oct 2014 20:30:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DjnCJU07C+jhbRg6DnoFwtdieWCbGoTbcwPIWVuXjVU=; b=mP2OH+5u6DueGGqYYQ83xhU6hovu8HkrLfo65TaKJees+LYbLhXRXWKyPJFEDVIvWL drZ+nOHS9Q/u8AlAAZKLBGmM11V7L1OgcjYGjOlejmIlPC7uP35A0SKNcH0Fo8Q+4zAN HULKmaEtOW5t/azSHBoFyzacEt9mhgJeKAnjVcNxpbQVi+0emgzBO+c9P49RjNwMmBU2 2SbZSH7LCod9RiQpTAWytMHrv0e8Yc9k82WvdAkmFvKZBiKoGS5EdK61tmaluNBR7jRb tzPmreGgrZfvm5v3H4W4NisdkbpRrYMibuprrg7An8LmywrAl4bT9vJUV1SoInNSeSdP PaNA== X-Gm-Message-State: ALoCoQnlgCWQREmEikD0ru9zMyRlIKCuKwEMKFGIjpxYTR3XycJhbUTw+F/sGgolovrUJBwkS9ah8Fvk1x5zzH+rOcP1VmFuwHetVzVxMU98vLzNVIuQ/GjnNcowjPvM2eXIcKDFA1MWZP+gNv9Px11F93C/nGfe9CjeAPPmdmK/xWyLpqihF+E= X-Received: by 10.68.192.102 with SMTP id hf6mr20698941pbc.3.1413862255875; Mon, 20 Oct 2014 20:30:55 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id t28si491691yhb.4.2014.10.20.20.30.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Oct 2014 20:30:55 -0700 (PDT) Received: from benzh.mtv.corp.google.com ([172.22.65.67]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id FXNRBbfM.1; Mon, 20 Oct 2014 20:30:55 -0700 Received: by benzh.mtv.corp.google.com (Postfix, from userid 215530) id A94F3E0FA4; Mon, 20 Oct 2014 20:30:54 -0700 (PDT) From: Ben Zhang To: alsa-devel@alsa-project.org Date: Mon, 20 Oct 2014 20:30:13 -0700 Message-Id: <1413862213-18449-1-git-send-email-benzh@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 Cc: Oder Chiou , Liam Girdwood , linux-kernel@vger.kernel.org, Ben Zhang , Mark Brown , Anatol Pomozov , Bard Liao , flove@realtek.com Subject: [alsa-devel] [PATCH] ASoC: rt5677: fix rt5677 spi driver build 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 Create a separate module for rt5677 spi driver. Without this patch, the build fails due to multiple defs of 'init_module' and 'cleanup_module'. module_spi_driver() defines its own module, so it can't be part of the rt5677 module. Signed-off-by: Ben Zhang --- sound/soc/codecs/Kconfig | 4 ++++ sound/soc/codecs/Makefile | 4 +++- sound/soc/codecs/rt5677-spi.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 2c7482e..6f21a76 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -504,6 +504,10 @@ config SND_SOC_RT5670 config SND_SOC_RT5677 tristate +config SND_SOC_RT5677_SPI + tristate + default SND_SOC_RT5677 + #Freescale sgtl5000 codec config SND_SOC_SGTL5000 tristate "Freescale SGTL5000 CODEC" diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 4435f9f..3e57edc 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -79,7 +79,8 @@ snd-soc-rt5640-objs := rt5640.o snd-soc-rt5645-objs := rt5645.o snd-soc-rt5651-objs := rt5651.o snd-soc-rt5670-objs := rt5670.o -snd-soc-rt5677-objs := rt5677.o rt5677-spi.o +snd-soc-rt5677-objs := rt5677.o +snd-soc-rt5677-spi-objs := rt5677-spi.o snd-soc-sgtl5000-objs := sgtl5000.o snd-soc-alc5623-objs := alc5623.o snd-soc-alc5632-objs := alc5632.o @@ -256,6 +257,7 @@ obj-$(CONFIG_SND_SOC_RT5645) += snd-soc-rt5645.o obj-$(CONFIG_SND_SOC_RT5651) += snd-soc-rt5651.o obj-$(CONFIG_SND_SOC_RT5670) += snd-soc-rt5670.o obj-$(CONFIG_SND_SOC_RT5677) += snd-soc-rt5677.o +obj-$(CONFIG_SND_SOC_RT5677_SPI) += snd-soc-rt5677-spi.o obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o obj-$(CONFIG_SND_SOC_SIGMADSP_I2C) += snd-soc-sigmadsp-i2c.o diff --git a/sound/soc/codecs/rt5677-spi.c b/sound/soc/codecs/rt5677-spi.c index 11c38f3..ef6348c 100644 --- a/sound/soc/codecs/rt5677-spi.c +++ b/sound/soc/codecs/rt5677-spi.c @@ -52,6 +52,7 @@ int rt5677_spi_write(u8 *txbuf, size_t len) return status; } +EXPORT_SYMBOL_GPL(rt5677_spi_write); /** * rt5677_spi_burst_write - Write data to SPI by rt5677 dsp memory address. @@ -107,6 +108,7 @@ int rt5677_spi_burst_write(u32 addr, const struct firmware *fw) return 0; } +EXPORT_SYMBOL_GPL(rt5677_spi_burst_write); static int rt5677_spi_probe(struct spi_device *spi) {