diff options
Diffstat (limited to 'include/media/rc-core.h')
-rw-r--r-- | include/media/rc-core.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 5e7197e40c14..6f3c3d977c81 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h | |||
@@ -160,6 +160,28 @@ struct rc_dev { | |||
160 | 160 | ||
161 | #define to_rc_dev(d) container_of(d, struct rc_dev, dev) | 161 | #define to_rc_dev(d) container_of(d, struct rc_dev, dev) |
162 | 162 | ||
163 | static inline bool rc_protocols_allowed(struct rc_dev *rdev, u64 protos) | ||
164 | { | ||
165 | return rdev->allowed_protos & protos; | ||
166 | } | ||
167 | |||
168 | /* should be called prior to registration or with mutex held */ | ||
169 | static inline void rc_set_allowed_protocols(struct rc_dev *rdev, u64 protos) | ||
170 | { | ||
171 | rdev->allowed_protos = protos; | ||
172 | } | ||
173 | |||
174 | static inline bool rc_protocols_enabled(struct rc_dev *rdev, u64 protos) | ||
175 | { | ||
176 | return rdev->enabled_protocols & protos; | ||
177 | } | ||
178 | |||
179 | /* should be called prior to registration or with mutex held */ | ||
180 | static inline void rc_set_enabled_protocols(struct rc_dev *rdev, u64 protos) | ||
181 | { | ||
182 | rdev->enabled_protocols = protos; | ||
183 | } | ||
184 | |||
163 | /* | 185 | /* |
164 | * From rc-main.c | 186 | * From rc-main.c |
165 | * Those functions can be used on any type of Remote Controller. They | 187 | * Those functions can be used on any type of Remote Controller. They |