From 6c77ba63bbaf5b6afcd8e427761703a5449e9af7 Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Wed, 9 May 2018 11:27:36 +0200
Subject: [PATCH] media: lgdt330x: mark lgdt330x_attach as __maybe_unused
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When CONFIG_DVB_LGDT330X is disabled, we get a harmless build warning:
In file included from drivers/media/common/b2c2/flexcop-fe-tuner.c:21:0:
drivers/media/dvb-frontends/lgdt330x.h:61:22: warning: ‘lgdt330x_attach’ defined but not used [-Wunused-function]
 struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *config,
                      ^~~~~~~~~~~~~~~

This marks the affected function as __maybe_unused

Fixes: d66b94b4aa2f ("V4L/DVB (11829): Rewrote frontend-attach mechanism to gain noise-less deactivation of submodules")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/media/dvb-frontends/lgdt330x.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/lgdt330x.h b/drivers/media/dvb-frontends/lgdt330x.h
index 94cc09d15ece..c3736ed724d8 100644
--- a/drivers/media/dvb-frontends/lgdt330x.h
+++ b/drivers/media/dvb-frontends/lgdt330x.h
@@ -58,7 +58,7 @@ struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *config,
 				     struct i2c_adapter *i2c);
 #else
 static
-struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *config,
+struct dvb_frontend __maybe_unused *lgdt330x_attach(const struct lgdt330x_config *config,
 				     u8 demod_address,
 				     struct i2c_adapter *i2c)
 {
-- 
2.17.0

