diff mbox

SOUND/SPI: Fix "clk_round_rate" undefined reference error.

Message ID 1378446371-5477-1-git-send-email-manjunath.goudar@linaro.org
State New
Headers show

Commit Message

manjunath.goudar@linaro.org Sept. 6, 2013, 5:46 a.m. UTC
This patch adds a COMMON_CLK dependency to configure the
SND_AT73C213 for Atmel AT73C213 DAC driver. Without this patch,
build system can lead to build failure. This was observed during
randconfig testing, in which SND_AT73C213 was enabled w/o COMMON_CLK
being enabled. leading to the following error:

sound/built-in.o: In function `snd_at73c213_probe':
:(.text+0x328c4): undefined reference to `clk_round_rate'
make: *** [vmlinux] Error 1

Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Deepak Saxena <dsaxena@linaro.org>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Cc: linux-input@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
---
 sound/spi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij Sept. 6, 2013, 8:27 a.m. UTC | #1
On Fri, Sep 6, 2013 at 7:46 AM, Manjunath Goudar
<manjunath.goudar@linaro.org> wrote:

> This patch adds a COMMON_CLK dependency to configure the
> SND_AT73C213 for Atmel AT73C213 DAC driver. Without this patch,
> build system can lead to build failure. This was observed during
> randconfig testing, in which SND_AT73C213 was enabled w/o COMMON_CLK
> being enabled. leading to the following error:

This the wrong way to solve this.

clk_round_rate() is part of the API for clock
implementations not using common clk.

Possibly HAVE_CLK should be used instead,
or the offending clk implementation need fixing.

Yours,
Linus Walleij
manjunath.goudar@linaro.org Sept. 7, 2013, 10:38 a.m. UTC | #2
On 6 September 2013 13:57, Linus Walleij <linus.walleij@linaro.org> wrote:

> On Fri, Sep 6, 2013 at 7:46 AM, Manjunath Goudar
> <manjunath.goudar@linaro.org> wrote:
>
> > This patch adds a COMMON_CLK dependency to configure the
> > SND_AT73C213 for Atmel AT73C213 DAC driver. Without this patch,
> > build system can lead to build failure. This was observed during
> > randconfig testing, in which SND_AT73C213 was enabled w/o COMMON_CLK
> > being enabled. leading to the following error:
>
> This the wrong way to solve this.
>
> clk_round_rate() is part of the API for clock
> implementations not using common clk.
>
> Possibly HAVE_CLK should be used instead,
> or the offending clk implementation need fixing.
>
> Yes you are correct, HAVE_CLK also one way to fix this issue.
for creating clk.o object COMMON_CLK is used Makefile na that's what
I used COMMON_CLK.


> Yours,
> Linus Walleij
>
diff mbox

Patch

diff --git a/sound/spi/Kconfig b/sound/spi/Kconfig
index e6485be..798d1ee 100644
--- a/sound/spi/Kconfig
+++ b/sound/spi/Kconfig
@@ -11,7 +11,7 @@  if SND_SPI
 
 config SND_AT73C213
 	tristate "Atmel AT73C213 DAC driver"
-	depends on ATMEL_SSC
+	depends on ATMEL_SSC && COMMON_CLK
 	select SND_PCM
 	help
 	  Say Y here if you want to use the Atmel AT73C213 external DAC. This