Skip to contentSkip to conversation

ARM: shmobile: only select sound drivers that build

PATCH Superseded Arnd Bergmann 2 participants 3 messages May 19, 2015

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: shmobile: only select sound drivers that build

A couple of codec drivers are selected by shmobile platform code, but depend on I2C, which results in a build error:

sound/soc/codecs/ak4642.c:638:1: warning: data definition has no type or storage class
module_i2c_driver(ak4642_i2c_driver);
^
sound/soc/codecs/ak4642.c:638:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int] sound/soc/codecs/ak4642.c:638:1: warning: parameter names (without types) in function declaration sound/soc/codecs/ak4642.c:627:26: warning: 'ak4642_i2c_driver' defined but not used [-Wunused-variable]

This ensures that we do not enable the respective drivers when I2C is disabled.

---
If this patch looks good, please add it to the shmobile git

arch/arm/mach-shmobile/Kconfig +3 -3
index 679b866399f2..ca2182078547 100644
@@ -150,7 +150,7 @@ config MACH_ARMADILLO800EVA
 	select ARCH_REQUIRE_GPIOLIB
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
 	select SMSC_PHY if SH_ETH
-	select SND_SOC_WM8978 if SND_SIMPLE_CARD
+	select SND_SOC_WM8978 if SND_SIMPLE_CARD && I2C
 	select USE_OF
 
 config MACH_BOCKW
@@ -158,8 +158,8 @@ config MACH_BOCKW
 	depends on ARCH_R8A7778
 	select ARCH_REQUIRE_GPIOLIB
 	select REGULATOR_FIXED_VOLTAGE if REGULATOR
-	select SND_SOC_AK4554 if SND_SIMPLE_CARD
-	select SND_SOC_AK4642 if SND_SIMPLE_CARD
+	select SND_SOC_AK4554 if SND_SIMPLE_CARD && I2C
+	select SND_SOC_AK4642 if SND_SIMPLE_CARD && I2C
 	select USE_OF
 
 config MACH_BOCKW_REFERENCE
#1 lore raw

PATCH 1/1 ARM: shmobile: only select sound drivers that build

Hi Arnd,

arch/arm/mach-shmobile/Kconfig config MACH_BOCKW · line 161

Quoted 13 lines · Arnd Bergmann

A couple of codec drivers are selected by shmobile platform code, but depend on I2C, which results in a build error:

arch/arm/mach-shmobile/Kconfig +1 -2
@@ -158,8 +158,8 @@ config MACH_BOCKW
        depends on ARCH_R8A7778
        select ARCH_REQUIRE_GPIOLIB
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
-       select SND_SOC_AK4554 if SND_SIMPLE_CARD
-       select SND_SOC_AK4642 if SND_SIMPLE_CARD
+       select SND_SOC_AK4554 if SND_SIMPLE_CARD && I2C

AK4554 is not an i2c device, but a plain platform device.

arch/arm/mach-shmobile/Kconfig config MACH_BOCKW · line 163

Quoted 2 lines
arch/arm/mach-shmobile/Kconfig +1 -0
+       select SND_SOC_AK4642 if SND_SIMPLE_CARD && I2C
        select USE_OF

The others are OK, so if you have remove AK4554, you can add my

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw

PATCH 1/1 ARM: shmobile: only select sound drivers that build

Quoted 17 lines · On Tuesday 19 May 2015 15:34:00 Geert Uytterhoeven wrote:

arch/arm/mach-shmobile/Kconfig config MACH_BOCKW · line 161

Quoted 13 lines · Arnd Bergmann

A couple of codec drivers are selected by shmobile platform code, but depend on I2C, which results in a build error:

arch/arm/mach-shmobile/Kconfig +1 -2
@@ -158,8 +158,8 @@ config MACH_BOCKW
        depends on ARCH_R8A7778
        select ARCH_REQUIRE_GPIOLIB
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
-       select SND_SOC_AK4554 if SND_SIMPLE_CARD
-       select SND_SOC_AK4642 if SND_SIMPLE_CARD
+       select SND_SOC_AK4554 if SND_SIMPLE_CARD && I2C

AK4554 is not an i2c device, but a plain platform device.

Quoted 7 lines

arch/arm/mach-shmobile/Kconfig config MACH_BOCKW · line 163

Quoted 2 lines
arch/arm/mach-shmobile/Kconfig +1 -0
+       select SND_SOC_AK4642 if SND_SIMPLE_CARD && I2C
        select USE_OF

The others are OK, so if you have remove AK4554, you can add my

Ah, my mistake. I've sent a fixed version 2 now.

Thanks!

Arnd