* [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER
@ 2014-03-05 16:53 Takashi Iwai
2014-03-05 17:03 ` Daniel Mack
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Takashi Iwai @ 2014-03-05 16:53 UTC (permalink / raw)
To: Mark Brown; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan
cs4271_common_probe() is called from cs4271_i2c_probe() but defined in
CONFIG_SPI_MASTER block, thus it results in a build error when
CONFIG_SPI_MASTER=n:
sound/soc/codecs/cs4271.c:721:2: error: implicit declaration of function ‘cs4271_common_probe’ [-Werror=implicit-function-declaration]
Move the function out of #if block.
Fixes: d6cf89ee07cb ('ASoC: cs4271: claim reset GPIO in bus probe function')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/cs4271.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index 96c309777208..aef4965750c7 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -612,22 +612,6 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = {
.num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes),
};
-#if defined(CONFIG_SPI_MASTER)
-
-static const struct regmap_config cs4271_spi_regmap = {
- .reg_bits = 16,
- .val_bits = 8,
- .max_register = CS4271_LASTREG,
- .read_flag_mask = 0x21,
- .write_flag_mask = 0x20,
-
- .reg_defaults = cs4271_reg_defaults,
- .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
- .cache_type = REGCACHE_RBTREE,
-
- .volatile_reg = cs4271_volatile_reg,
-};
-
static int cs4271_common_probe(struct device *dev,
struct cs4271_private **c)
{
@@ -658,6 +642,22 @@ static int cs4271_common_probe(struct device *dev,
return 0;
}
+#if defined(CONFIG_SPI_MASTER)
+
+static const struct regmap_config cs4271_spi_regmap = {
+ .reg_bits = 16,
+ .val_bits = 8,
+ .max_register = CS4271_LASTREG,
+ .read_flag_mask = 0x21,
+ .write_flag_mask = 0x20,
+
+ .reg_defaults = cs4271_reg_defaults,
+ .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
+ .cache_type = REGCACHE_RBTREE,
+
+ .volatile_reg = cs4271_volatile_reg,
+};
+
static int cs4271_spi_probe(struct spi_device *spi)
{
struct cs4271_private *cs4271;
--
1.9.0
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER
2014-03-05 16:53 [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER Takashi Iwai
@ 2014-03-05 17:03 ` Daniel Mack
2014-03-05 17:03 ` Brian Austin
2014-03-06 4:31 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Mack @ 2014-03-05 17:03 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown
Cc: Brian Austin, alsa-devel, Paul Handrigan, Liam Girdwood
On 03/05/2014 05:53 PM, Takashi Iwai wrote:
> cs4271_common_probe() is called from cs4271_i2c_probe() but defined in
> CONFIG_SPI_MASTER block, thus it results in a build error when
> CONFIG_SPI_MASTER=n:
> sound/soc/codecs/cs4271.c:721:2: error: implicit declaration of function ‘cs4271_common_probe’ [-Werror=implicit-function-declaration]
>
> Move the function out of #if block.
>
> Fixes: d6cf89ee07cb ('ASoC: cs4271: claim reset GPIO in bus probe function')
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thanks!
Acked-by: Daniel Mack <daniel@zonque.org>
> ---
> sound/soc/codecs/cs4271.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
> index 96c309777208..aef4965750c7 100644
> --- a/sound/soc/codecs/cs4271.c
> +++ b/sound/soc/codecs/cs4271.c
> @@ -612,22 +612,6 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = {
> .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes),
> };
>
> -#if defined(CONFIG_SPI_MASTER)
> -
> -static const struct regmap_config cs4271_spi_regmap = {
> - .reg_bits = 16,
> - .val_bits = 8,
> - .max_register = CS4271_LASTREG,
> - .read_flag_mask = 0x21,
> - .write_flag_mask = 0x20,
> -
> - .reg_defaults = cs4271_reg_defaults,
> - .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
> - .cache_type = REGCACHE_RBTREE,
> -
> - .volatile_reg = cs4271_volatile_reg,
> -};
> -
> static int cs4271_common_probe(struct device *dev,
> struct cs4271_private **c)
> {
> @@ -658,6 +642,22 @@ static int cs4271_common_probe(struct device *dev,
> return 0;
> }
>
> +#if defined(CONFIG_SPI_MASTER)
> +
> +static const struct regmap_config cs4271_spi_regmap = {
> + .reg_bits = 16,
> + .val_bits = 8,
> + .max_register = CS4271_LASTREG,
> + .read_flag_mask = 0x21,
> + .write_flag_mask = 0x20,
> +
> + .reg_defaults = cs4271_reg_defaults,
> + .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
> + .cache_type = REGCACHE_RBTREE,
> +
> + .volatile_reg = cs4271_volatile_reg,
> +};
> +
> static int cs4271_spi_probe(struct spi_device *spi)
> {
> struct cs4271_private *cs4271;
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER
2014-03-05 16:53 [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER Takashi Iwai
2014-03-05 17:03 ` Daniel Mack
@ 2014-03-05 17:03 ` Brian Austin
2014-03-06 4:31 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Brian Austin @ 2014-03-05 17:03 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Brian Austin, Mark Brown, Liam Girdwood,
Paul Handrigan
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
On Wed, 5 Mar 2014, Takashi Iwai wrote:
> cs4271_common_probe() is called from cs4271_i2c_probe() but defined in
> CONFIG_SPI_MASTER block, thus it results in a build error when
> CONFIG_SPI_MASTER=n:
> sound/soc/codecs/cs4271.c:721:2: error: implicit declaration of function ‘cs4271_common_probe’ [-Werror=implicit-function-declaration]
>
> Move the function out of #if block.
>
> Fixes: d6cf89ee07cb ('ASoC: cs4271: claim reset GPIO in bus probe function')
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
Acked-by: Brian Austin <brian.austin@cirrus.com>
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER
2014-03-05 16:53 [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER Takashi Iwai
2014-03-05 17:03 ` Daniel Mack
2014-03-05 17:03 ` Brian Austin
@ 2014-03-06 4:31 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-03-06 4:31 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan
[-- Attachment #1.1: Type: text/plain, Size: 391 bytes --]
On Wed, Mar 05, 2014 at 05:53:31PM +0100, Takashi Iwai wrote:
> cs4271_common_probe() is called from cs4271_i2c_probe() but defined in
> CONFIG_SPI_MASTER block, thus it results in a build error when
> CONFIG_SPI_MASTER=n:
> sound/soc/codecs/cs4271.c:721:2: error: implicit declaration of function ‘cs4271_common_probe’ [-Werror=implicit-function-declaration]
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-06 4:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 16:53 [PATCH] ASoC: cs4271: Fix build error without CONFIG_SPI_MASTER Takashi Iwai
2014-03-05 17:03 ` Daniel Mack
2014-03-05 17:03 ` Brian Austin
2014-03-06 4:31 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.