All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: fix pcm1789.c build errors
@ 2018-05-16  4:42 Randy Dunlap
  2018-05-31 11:06   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2018-05-16  4:42 UTC (permalink / raw)
  To: moderated for non-subscribers
  Cc: Mylène Josserand, LKML, Liam Girdwood, Mark Brown,
	Andrew Morton, kbuild test robot

From: Randy Dunlap <rdunlap@infradead.org>

Fix build errors in pcm1789.c.
The source file needs to #include <linux/gpio/consumer.h> since it
uses interfaces and macros that are provided by it.
However, it does not need to #include <linux/gpio.h>, so drop it.

Fixes these build errors:

../sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init':
../sound/soc/codecs/pcm1789.c:247:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
  pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
../sound/soc/codecs/pcm1789.c:247:57: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function)
  pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
../sound/soc/codecs/pcm1789.c:251:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
  gpiod_set_value_cansleep(pcm1789->reset, 0);

Fixes: 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mylène Josserand <mylene.josserand@bootlin.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
---
 sound/soc/codecs/pcm1789.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

BTW, MODULE_AUTHOR() still uses @free-electrons.com.

--- lnx-417-rc4.orig/sound/soc/codecs/pcm1789.c
+++ lnx-417-rc4/sound/soc/codecs/pcm1789.c
@@ -3,7 +3,7 @@
 // Copyright (C) 2018 Bootlin
 // Mylène Josserand <mylene.josserand@bootlin.com>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Applied "ASoC: codecs: PCM1789: include gpio/consumer.h" to the asoc tree
  2018-05-16  4:42 [PATCH] ASoC: codecs: fix pcm1789.c build errors Randy Dunlap
@ 2018-05-31 11:06   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2018-05-31 11:06 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, moderated for non-subscribers, kbuild test robot,
	LKML, Liam Girdwood, Mark Brown, Andrew Morton,
	Mylène Josserand, alsa-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2268 bytes --]

The patch

   ASoC: codecs: PCM1789: include gpio/consumer.h

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 3217004ad97fdae6663e8e75c443d8e616cb7fd0 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 30 May 2018 23:53:45 +0200
Subject: [PATCH] ASoC: codecs: PCM1789: include gpio/consumer.h

When CONFIG_GPIOLIB is disabled, this codec fails to build
because gpio/consumer.h is not included implicitly.

sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init':
sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]
  pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
                   ^~~~~~~~~~~~~~~~~~~~~~~

Fixes: 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/pcm1789.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/pcm1789.c b/sound/soc/codecs/pcm1789.c
index 507ac9412d6c..21f15219b3ad 100644
--- a/sound/soc/codecs/pcm1789.c
+++ b/sound/soc/codecs/pcm1789.c
@@ -3,7 +3,7 @@
 // Copyright (C) 2018 Bootlin
 // Mylène Josserand <mylene.josserand@bootlin.com>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Applied "ASoC: codecs: PCM1789: include gpio/consumer.h" to the asoc tree
@ 2018-05-31 11:06   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2018-05-31 11:06 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: alsa-devel, kbuild test robot, Liam Girdwood, LKML, Mark Brown,
	Andrew Morton, Mylène Josserand

[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]

The patch

   ASoC: codecs: PCM1789: include gpio/consumer.h

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 3217004ad97fdae6663e8e75c443d8e616cb7fd0 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 30 May 2018 23:53:45 +0200
Subject: [PATCH] ASoC: codecs: PCM1789: include gpio/consumer.h

When CONFIG_GPIOLIB is disabled, this codec fails to build
because gpio/consumer.h is not included implicitly.

sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init':
sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]
  pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
                   ^~~~~~~~~~~~~~~~~~~~~~~

Fixes: 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/pcm1789.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/pcm1789.c b/sound/soc/codecs/pcm1789.c
index 507ac9412d6c..21f15219b3ad 100644
--- a/sound/soc/codecs/pcm1789.c
+++ b/sound/soc/codecs/pcm1789.c
@@ -3,7 +3,7 @@
 // Copyright (C) 2018 Bootlin
 // Mylène Josserand <mylene.josserand@bootlin.com>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>
 
-- 
2.17.0


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-31 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16  4:42 [PATCH] ASoC: codecs: fix pcm1789.c build errors Randy Dunlap
2018-05-31 11:06 ` Applied "ASoC: codecs: PCM1789: include gpio/consumer.h" to the asoc tree Mark Brown
2018-05-31 11:06   ` 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.