Commit 9dc353c6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] tuners: use IS_ENABLED

Instead of checking everywhere there for 3 symbols, use instead
IS_ENABLED macro.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 782d8b74
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef E4000_H #ifndef E4000_H
#define E4000_H #define E4000_H
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
struct e4000_config { struct e4000_config {
...@@ -36,8 +37,7 @@ struct e4000_config { ...@@ -36,8 +37,7 @@ struct e4000_config {
u32 clock; u32 clock;
}; };
#if defined(CONFIG_MEDIA_TUNER_E4000) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_E4000)
(defined(CONFIG_MEDIA_TUNER_E4000_MODULE) && defined(MODULE))
extern struct dvb_frontend *e4000_attach(struct dvb_frontend *fe, extern struct dvb_frontend *e4000_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, const struct e4000_config *cfg); struct i2c_adapter *i2c, const struct e4000_config *cfg);
#else #else
......
#ifndef LINUX_FC0011_H_ #ifndef LINUX_FC0011_H_
#define LINUX_FC0011_H_ #define LINUX_FC0011_H_
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
...@@ -22,8 +23,7 @@ enum fc0011_fe_callback_commands { ...@@ -22,8 +23,7 @@ enum fc0011_fe_callback_commands {
FC0011_FE_CALLBACK_RESET, FC0011_FE_CALLBACK_RESET,
}; };
#if defined(CONFIG_MEDIA_TUNER_FC0011) ||\ #if IS_ENABLED(CONFIG_MEDIA_TUNER_FC0011)
defined(CONFIG_MEDIA_TUNER_FC0011_MODULE)
struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
const struct fc0011_config *config); const struct fc0011_config *config);
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef _FC0012_H_ #ifndef _FC0012_H_
#define _FC0012_H_ #define _FC0012_H_
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "fc001x-common.h" #include "fc001x-common.h"
...@@ -48,8 +49,7 @@ struct fc0012_config { ...@@ -48,8 +49,7 @@ struct fc0012_config {
bool clock_out; bool clock_out;
}; };
#if defined(CONFIG_MEDIA_TUNER_FC0012) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_FC0012)
(defined(CONFIG_MEDIA_TUNER_FC0012_MODULE) && defined(MODULE))
extern struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe, extern struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
const struct fc0012_config *cfg); const struct fc0012_config *cfg);
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
#ifndef _FC0013_H_ #ifndef _FC0013_H_
#define _FC0013_H_ #define _FC0013_H_
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "fc001x-common.h" #include "fc001x-common.h"
#if defined(CONFIG_MEDIA_TUNER_FC0013) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_FC0013)
(defined(CONFIG_MEDIA_TUNER_FC0013_MODULE) && defined(MODULE))
extern struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe, extern struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
u8 i2c_address, int dual_master, u8 i2c_address, int dual_master,
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef FC2580_H #ifndef FC2580_H
#define FC2580_H #define FC2580_H
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
struct fc2580_config { struct fc2580_config {
...@@ -36,8 +37,7 @@ struct fc2580_config { ...@@ -36,8 +37,7 @@ struct fc2580_config {
u32 clock; u32 clock;
}; };
#if defined(CONFIG_MEDIA_TUNER_FC2580) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_FC2580)
(defined(CONFIG_MEDIA_TUNER_FC2580_MODULE) && defined(MODULE))
extern struct dvb_frontend *fc2580_attach(struct dvb_frontend *fe, extern struct dvb_frontend *fc2580_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, const struct fc2580_config *cfg); struct i2c_adapter *i2c, const struct fc2580_config *cfg);
#else #else
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef __MAX2165_H__ #ifndef __MAX2165_H__
#define __MAX2165_H__ #define __MAX2165_H__
#include <linux/kconfig.h>
struct dvb_frontend; struct dvb_frontend;
struct i2c_adapter; struct i2c_adapter;
...@@ -30,8 +32,7 @@ struct max2165_config { ...@@ -30,8 +32,7 @@ struct max2165_config {
u8 osc_clk; /* in MHz, selectable values: 4,16,18,20,22,24,26,28 */ u8 osc_clk; /* in MHz, selectable values: 4,16,18,20,22,24,26,28 */
}; };
#if defined(CONFIG_MEDIA_TUNER_MAX2165) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_MAX2165)
(defined(CONFIG_MEDIA_TUNER_MAX2165_MODULE) && defined(MODULE))
extern struct dvb_frontend *max2165_attach(struct dvb_frontend *fe, extern struct dvb_frontend *max2165_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
struct max2165_config *cfg); struct max2165_config *cfg);
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef MC44S803_H #ifndef MC44S803_H
#define MC44S803_H #define MC44S803_H
#include <linux/kconfig.h>
struct dvb_frontend; struct dvb_frontend;
struct i2c_adapter; struct i2c_adapter;
...@@ -30,8 +32,7 @@ struct mc44s803_config { ...@@ -30,8 +32,7 @@ struct mc44s803_config {
u8 dig_out; u8 dig_out;
}; };
#if defined(CONFIG_MEDIA_TUNER_MC44S803) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_MC44S803)
(defined(CONFIG_MEDIA_TUNER_MC44S803_MODULE) && defined(MODULE))
extern struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe, extern struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct mc44s803_config *cfg); struct i2c_adapter *i2c, struct mc44s803_config *cfg);
#else #else
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#ifndef __MXL5005S_H #ifndef __MXL5005S_H
#define __MXL5005S_H #define __MXL5005S_H
#include <linux/kconfig.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
...@@ -116,8 +118,7 @@ struct mxl5005s_config { ...@@ -116,8 +118,7 @@ struct mxl5005s_config {
u8 AgcMasterByte; u8 AgcMasterByte;
}; };
#if defined(CONFIG_MEDIA_TUNER_MXL5005S) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_MXL5005S)
(defined(CONFIG_MEDIA_TUNER_MXL5005S_MODULE) && defined(MODULE))
extern struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe, extern struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
struct mxl5005s_config *config); struct mxl5005s_config *config);
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef TDA18212_H #ifndef TDA18212_H
#define TDA18212_H #define TDA18212_H
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
struct tda18212_config { struct tda18212_config {
...@@ -36,8 +37,7 @@ struct tda18212_config { ...@@ -36,8 +37,7 @@ struct tda18212_config {
u16 if_dvbc; u16 if_dvbc;
}; };
#if defined(CONFIG_MEDIA_TUNER_TDA18212) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_TDA18212)
(defined(CONFIG_MEDIA_TUNER_TDA18212_MODULE) && defined(MODULE))
extern struct dvb_frontend *tda18212_attach(struct dvb_frontend *fe, extern struct dvb_frontend *tda18212_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct tda18212_config *cfg); struct i2c_adapter *i2c, struct tda18212_config *cfg);
#else #else
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef TDA18218_H #ifndef TDA18218_H
#define TDA18218_H #define TDA18218_H
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
struct tda18218_config { struct tda18218_config {
...@@ -29,8 +30,7 @@ struct tda18218_config { ...@@ -29,8 +30,7 @@ struct tda18218_config {
u8 loop_through:1; u8 loop_through:1;
}; };
#if defined(CONFIG_MEDIA_TUNER_TDA18218) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_TDA18218)
(defined(CONFIG_MEDIA_TUNER_TDA18218_MODULE) && defined(MODULE))
extern struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe, extern struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct tda18218_config *cfg); struct i2c_adapter *i2c, struct tda18218_config *cfg);
#else #else
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef TUA9001_H #ifndef TUA9001_H
#define TUA9001_H #define TUA9001_H
#include <linux/kconfig.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
struct tua9001_config { struct tua9001_config {
...@@ -50,8 +51,7 @@ struct tua9001_config { ...@@ -50,8 +51,7 @@ struct tua9001_config {
#define TUA9001_CMD_RESETN 1 #define TUA9001_CMD_RESETN 1
#define TUA9001_CMD_RXEN 2 #define TUA9001_CMD_RXEN 2
#if defined(CONFIG_MEDIA_TUNER_TUA9001) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_TUA9001)
(defined(CONFIG_MEDIA_TUNER_TUA9001_MODULE) && defined(MODULE))
extern struct dvb_frontend *tua9001_attach(struct dvb_frontend *fe, extern struct dvb_frontend *tua9001_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct tua9001_config *cfg); struct i2c_adapter *i2c, struct tua9001_config *cfg);
#else #else
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#ifndef __XC5000_H__ #ifndef __XC5000_H__
#define __XC5000_H__ #define __XC5000_H__
#include <linux/kconfig.h>
#include <linux/firmware.h> #include <linux/firmware.h>
struct dvb_frontend; struct dvb_frontend;
...@@ -56,8 +57,7 @@ struct xc5000_config { ...@@ -56,8 +57,7 @@ struct xc5000_config {
* it's passed back to a bridge during tuner_callback(). * it's passed back to a bridge during tuner_callback().
*/ */
#if defined(CONFIG_MEDIA_TUNER_XC5000) || \ #if IS_ENABLED(CONFIG_MEDIA_TUNER_XC5000)
(defined(CONFIG_MEDIA_TUNER_XC5000_MODULE) && defined(MODULE))
extern struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, extern struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
const struct xc5000_config *cfg); const struct xc5000_config *cfg);
......
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