mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [media] dvb-usb: hide unused functions
@ 2016-03-23 10:30 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2016-03-23 10:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Arnd Bergmann
  Cc: Patrick Boettcher, linux-media, linux-kernel

A couple of data structures in the dibusb-common file are only
accessed when CONFIG_DVB_DIB3000MC is enabled, otherwise we
get a harmless gcc warning:

usb/dvb-usb/dibusb-common.c:223:34: error: 'dib3000p_panasonic_agc_config' defined but not used
usb/dvb-usb/dibusb-common.c:211:32: error: 'stk3000p_dib3000p_config' defined but not used

This moves the existing #ifdef a few lines up to correctly cover
all the conditional data structures, which gets rid of the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/usb/dvb-usb/dibusb-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c
index 35de6095926d..6eea4e68891d 100644
--- a/drivers/media/usb/dvb-usb/dibusb-common.c
+++ b/drivers/media/usb/dvb-usb/dibusb-common.c
@@ -184,6 +184,8 @@ int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
 }
 EXPORT_SYMBOL(dibusb_read_eeprom_byte);
 
+#if IS_ENABLED(CONFIG_DVB_DIB3000MC)
+
 /* 3000MC/P stuff */
 // Config Adjacent channels  Perf -cal22
 static struct dibx000_agc_config dib3000p_mt2060_agc_config = {
@@ -242,8 +244,6 @@ static struct dibx000_agc_config dib3000p_panasonic_agc_config = {
 	.agc2_slope2 = 0x1e,
 };
 
-#if IS_ENABLED(CONFIG_DVB_DIB3000MC)
-
 static struct dib3000mc_config mod3000p_dib3000p_config = {
 	&dib3000p_panasonic_agc_config,
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-23 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 10:30 [PATCH] [media] dvb-usb: hide unused functions Arnd Bergmann

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®