Commit 0e63a2be authored by YueHaibing's avatar YueHaibing Committed by Mark Brown

ASoC: mediatek: mt8195: Fix build warning without CONFIG_OF

sound/soc/mediatek/mt8195/mt8195-mt6359.c:1639:32: warning: ‘mt8195_mt6359_max98390_rt5682_card’ defined but not used [-Wunused-variable]
 1639 | static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1634:32: warning: ‘mt8195_mt6359_rt1011_rt5682_card’ defined but not used [-Wunused-variable]
 1634 | static struct mt8195_card_data mt8195_mt6359_rt1011_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1629:32: warning: ‘mt8195_mt6359_rt1019_rt5682_card’ defined but not used [-Wunused-variable]
 1629 | static struct mt8195_card_data mt8195_mt6359_rt1019_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since all users of this driver do need CONFIG_OF anyway, there is no
need to save a few bytes on kernel builds while CONFIG_OF disabled, so
just remove the #ifdef to fix this warning.

Fixes: 86a6b9c9 ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220509120918.9000-1-yuehaibing@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3a3610aa
...@@ -1641,7 +1641,6 @@ static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = { ...@@ -1641,7 +1641,6 @@ static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = {
.quirk = MAX98390_SPEAKER_AMP_PRESENT, .quirk = MAX98390_SPEAKER_AMP_PRESENT,
}; };
#ifdef CONFIG_OF
static const struct of_device_id mt8195_mt6359_dt_match[] = { static const struct of_device_id mt8195_mt6359_dt_match[] = {
{ {
.compatible = "mediatek,mt8195_mt6359_rt1019_rt5682", .compatible = "mediatek,mt8195_mt6359_rt1019_rt5682",
...@@ -1657,7 +1656,6 @@ static const struct of_device_id mt8195_mt6359_dt_match[] = { ...@@ -1657,7 +1656,6 @@ static const struct of_device_id mt8195_mt6359_dt_match[] = {
}, },
{}, {},
}; };
#endif
static const struct dev_pm_ops mt8195_mt6359_pm_ops = { static const struct dev_pm_ops mt8195_mt6359_pm_ops = {
.poweroff = snd_soc_poweroff, .poweroff = snd_soc_poweroff,
...@@ -1667,9 +1665,7 @@ static const struct dev_pm_ops mt8195_mt6359_pm_ops = { ...@@ -1667,9 +1665,7 @@ static const struct dev_pm_ops mt8195_mt6359_pm_ops = {
static struct platform_driver mt8195_mt6359_driver = { static struct platform_driver mt8195_mt6359_driver = {
.driver = { .driver = {
.name = "mt8195_mt6359", .name = "mt8195_mt6359",
#ifdef CONFIG_OF
.of_match_table = mt8195_mt6359_dt_match, .of_match_table = mt8195_mt6359_dt_match,
#endif
.pm = &mt8195_mt6359_pm_ops, .pm = &mt8195_mt6359_pm_ops,
}, },
.probe = mt8195_mt6359_dev_probe, .probe = mt8195_mt6359_dev_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment