From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
Date: Mon, 17 Nov 2014 16:56:17 +0100 [thread overview]
Message-ID: <20141117155617.GJ27002@pengutronix.de> (raw)
In-Reply-To: <1416232589-31319-1-git-send-email-krishna.md@samsung.com>
On Mon, Nov 17, 2014 at 07:26:29PM +0530, Krishna Mohan Dani wrote:
> Fixes the following compilation warning:
> Warning: 'rt5631_i2c_dt_ids' defined but not used - when DT is not used.
>
> Signed-off-by: Claude Youn <claude.youn@gmail.com>
> Signed-off-by: Krishna Mohan Dani <krishna.md@samsung.com>
> ---
> sound/soc/codecs/rt5631.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
> index 3b7d5e4..9425545 100644
> --- a/sound/soc/codecs/rt5631.c
> +++ b/sound/soc/codecs/rt5631.c
> @@ -1691,12 +1691,14 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
>
> +#ifdef CONFIG_OF
> static struct of_device_id rt5631_i2c_dt_ids[] = {
> { .compatible = "realtek,rt5631"},
> { .compatible = "realtek,alc5631"},
> { }
> };
> MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
> +#endif
An (IMHO nicer) alternative is:
-static struct of_device_id rt5631_i2c_dt_ids[] = {
+static struct of_device_id rt5631_i2c_dt_ids[] __maybe_unused = {
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2014-11-17 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 13:56 [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled Krishna Mohan Dani
2014-11-17 14:52 ` Mark Brown
2014-11-17 15:56 ` Uwe Kleine-König [this message]
2014-11-24 7:18 ` D Krishna Mohan
2014-11-24 11:05 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2014-11-24 11:22 Krishna Mohan Dani
2014-11-24 17:04 ` Mark Brown
2014-11-26 8:56 ` D Krishna Mohan
2014-11-26 18:14 ` 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=20141117155617.GJ27002@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).