From: Hui Tang <tanghui20@huawei.com>
To: <lgirdwood@gmail.com>
Cc: <broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.com>,
<ryan.lee.analog@gmail.com>, <ricardw@axis.com>, <steve@sk2.org>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<tanghui20@huawei.com>
Subject: [PATCH -next v2 1/2] ASoC: max98396: Fix build error for implicit function declaration
Date: Thu, 12 May 2022 15:46:39 +0800 [thread overview]
Message-ID: <20220512074640.75550-2-tanghui20@huawei.com> (raw)
In-Reply-To: <20220512074640.75550-1-tanghui20@huawei.com>
sound/soc/codecs/max98396.c: In function ‘max98396_i2c_probe’:
sound/soc/codecs/max98396.c:1555:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
max98396->reset_gpio = devm_gpiod_get_optional(&i2c->dev,
^~~~~~~~~~~~~~~~~~~~~~~
devm_regulator_get_optional
sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
"reset", GPIOD_OUT_HIGH);
^~~~~~~~~~~~~~
GPIOF_INIT_HIGH
sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(max98396->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
cc1: all warnings being treated as errors
Include header file <linux/gpio/consumer.h>
Fixes: b58581136770 ("ASoC: max98396: add amplifier driver")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
Changes in v2:
* Add missing header files instead of adding dependencies
sound/soc/codecs/max98396.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c
index 745d7e761680..56eb62bb041f 100644
--- a/sound/soc/codecs/max98396.c
+++ b/sound/soc/codecs/max98396.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2022, Analog Devices Inc.
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <sound/pcm_params.h>
--
2.17.1
next prev parent reply other threads:[~2022-05-12 7:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 7:46 [PATCH -next v2 0/2] ASoC: codecs: Fix build error Hui Tang
2022-05-12 7:46 ` Hui Tang [this message]
2022-05-12 7:46 ` [PATCH -next v2 2/2] ASoC: tlv320adc3xxx: Fix build error for implicit function declaration Hui Tang
2022-05-12 14:12 ` [PATCH -next v2 0/2] ASoC: codecs: Fix build error Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220512074640.75550-2-tanghui20@huawei.com \
--to=tanghui20@huawei.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ricardw@axis.com \
--cc=ryan.lee.analog@gmail.com \
--cc=steve@sk2.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®