treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / dvb-frontends / s921.h
blob436fc7921486c6921933cf33a6a23a49c1eef0bf
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Sharp s921 driver
5 * Copyright (C) 2009 Mauro Carvalho Chehab
6 * Copyright (C) 2009 Douglas Landgraf <dougsland@redhat.com>
7 */
9 #ifndef S921_H
10 #define S921_H
12 #include <linux/dvb/frontend.h>
14 struct s921_config {
15 /* the demodulator's i2c address */
16 u8 demod_address;
19 #if IS_REACHABLE(CONFIG_DVB_S921)
20 extern struct dvb_frontend *s921_attach(const struct s921_config *config,
21 struct i2c_adapter *i2c);
22 extern struct i2c_adapter *s921_get_tuner_i2c_adapter(struct dvb_frontend *);
23 #else
24 static inline struct dvb_frontend *s921_attach(
25 const struct s921_config *config, struct i2c_adapter *i2c)
27 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
28 return NULL;
30 static inline struct i2c_adapter *
31 s921_get_tuner_i2c_adapter(struct dvb_frontend *fe)
33 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
34 return NULL;
36 #endif
38 #endif /* S921_H */