treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / rc / img-ir / img-ir-raw.h
blob0441af70d4a04f24a4024eded7d5a9a0e5500aa9
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * ImgTec IR Raw Decoder found in PowerDown Controller.
5 * Copyright 2010-2014 Imagination Technologies Ltd.
6 */
8 #ifndef _IMG_IR_RAW_H_
9 #define _IMG_IR_RAW_H_
11 struct img_ir_priv;
13 #ifdef CONFIG_IR_IMG_RAW
15 /**
16 * struct img_ir_priv_raw - Private driver data for raw decoder.
17 * @rdev: Raw remote control device
18 * @timer: Timer to echo samples to keep soft decoders happy.
19 * @last_status: Last raw status bits.
21 struct img_ir_priv_raw {
22 struct rc_dev *rdev;
23 struct timer_list timer;
24 u32 last_status;
27 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
29 return raw->rdev;
32 void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status);
33 void img_ir_setup_raw(struct img_ir_priv *priv);
34 int img_ir_probe_raw(struct img_ir_priv *priv);
35 void img_ir_remove_raw(struct img_ir_priv *priv);
37 #else
39 struct img_ir_priv_raw {
41 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
43 return false;
45 static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
48 static inline void img_ir_setup_raw(struct img_ir_priv *priv)
51 static inline int img_ir_probe_raw(struct img_ir_priv *priv)
53 return -ENODEV;
55 static inline void img_ir_remove_raw(struct img_ir_priv *priv)
59 #endif /* CONFIG_IR_IMG_RAW */
61 #endif /* _IMG_IR_RAW_H_ */