diff options
Diffstat (limited to 'include/linux/rfkill.h')
| -rw-r--r-- | include/linux/rfkill.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index d9010789b4e8..e6a0031d1b1f 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -104,7 +104,8 @@ int __must_check rfkill_register(struct rfkill *rfkill); | |||
| 104 | * | 104 | * |
| 105 | * Pause polling -- say transmitter is off for other reasons. | 105 | * Pause polling -- say transmitter is off for other reasons. |
| 106 | * NOTE: not necessary for suspend/resume -- in that case the | 106 | * NOTE: not necessary for suspend/resume -- in that case the |
| 107 | * core stops polling anyway | 107 | * core stops polling anyway (but will also correctly handle |
| 108 | * the case of polling having been paused before suspend.) | ||
| 108 | */ | 109 | */ |
| 109 | void rfkill_pause_polling(struct rfkill *rfkill); | 110 | void rfkill_pause_polling(struct rfkill *rfkill); |
| 110 | 111 | ||
| @@ -212,6 +213,15 @@ void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw); | |||
| 212 | * @rfkill: rfkill struct to query | 213 | * @rfkill: rfkill struct to query |
| 213 | */ | 214 | */ |
| 214 | bool rfkill_blocked(struct rfkill *rfkill); | 215 | bool rfkill_blocked(struct rfkill *rfkill); |
| 216 | |||
| 217 | /** | ||
| 218 | * rfkill_find_type - Helpper for finding rfkill type by name | ||
| 219 | * @name: the name of the type | ||
| 220 | * | ||
| 221 | * Returns enum rfkill_type that conrresponds the name. | ||
| 222 | */ | ||
| 223 | enum rfkill_type rfkill_find_type(const char *name); | ||
| 224 | |||
| 215 | #else /* !RFKILL */ | 225 | #else /* !RFKILL */ |
| 216 | static inline struct rfkill * __must_check | 226 | static inline struct rfkill * __must_check |
| 217 | rfkill_alloc(const char *name, | 227 | rfkill_alloc(const char *name, |
| @@ -268,6 +278,12 @@ static inline bool rfkill_blocked(struct rfkill *rfkill) | |||
| 268 | { | 278 | { |
| 269 | return false; | 279 | return false; |
| 270 | } | 280 | } |
| 281 | |||
| 282 | static inline enum rfkill_type rfkill_find_type(const char *name) | ||
| 283 | { | ||
| 284 | return RFKILL_TYPE_ALL; | ||
| 285 | } | ||
| 286 | |||
| 271 | #endif /* RFKILL || RFKILL_MODULE */ | 287 | #endif /* RFKILL || RFKILL_MODULE */ |
| 272 | 288 | ||
| 273 | 289 | ||
