OSDN Git Service

b2c2: flexcop: avoid unused function warnings
authorArnd Bergmann <arnd@arndb.de>
Tue, 26 Jan 2016 14:09:58 +0000 (12:09 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:48 +0000 (11:03 +0100)
commit7a06f431f9974dd4e461fec60ee19ec8e14dd6c1
tree4a7335a2348350ab399c5f91f9fbc962942fd786
parent5bef71a69fb57e73ccf300cc6f609f18336ae9c7
b2c2: flexcop: avoid unused function warnings

commit 733d0def3ebdd1d088330d904149af21fa4b9ae2 upstream.

The flexcop driver has two functions that are normally used, except
when multiple frontend drivers are disabled:

drivers/media/common/b2c2/flexcop-fe-tuner.c:42:12: warning: 'flexcop_set_voltage' defined but not used [-Wunused-function]
drivers/media/common/b2c2/flexcop-fe-tuner.c:71:12: warning: 'flexcop_sleep' defined but not used [-Wunused-function]

This avoids the build warning by updating the #ifdef for flexcop_set_voltage
to the exact condition under which it is used. For flexcop_sleep, the
condition is rather complex, so I resort to marking it as __maybe_unused,
so the compiler can silently drop it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/common/b2c2/flexcop-fe-tuner.c