aboutsummaryrefslogtreecommitdiff
path: root/include/linux/rfkill.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-20 12:39:18 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-20 12:39:18 +0200
commit170465ee7f5a9a2d0ac71285507e52642e040353 (patch)
treedbca81f04cde9e625170abbd6a72555cfbeb194e /include/linux/rfkill.h
parent169ad16bb87c10a3f7c108bb7008ebc0270f617a (diff)
parent1fca25427482387689fa27594c992a961d98768f (diff)
Merge branch 'linus' into x86/xen
Diffstat (limited to 'include/linux/rfkill.h')
-rw-r--r--include/linux/rfkill.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index c5f6e54ec6a..741d1a62cc3 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -68,7 +68,8 @@ enum rfkill_state {
* @user_claim_unsupported: Whether the hardware supports exclusive
* RF-kill control by userspace. Set this before registering.
* @user_claim: Set when the switch is controlled exlusively by userspace.
- * @mutex: Guards switch state transitions
+ * @mutex: Guards switch state transitions. It serializes callbacks
+ * and also protects the state.
* @data: Pointer to the RF button drivers private data which will be
* passed along when toggling radio state.
* @toggle_radio(): Mandatory handler to control state of the radio.
@@ -89,12 +90,13 @@ struct rfkill {
const char *name;
enum rfkill_type type;
- enum rfkill_state state;
bool user_claim_unsupported;
bool user_claim;
+ /* the mutex serializes callbacks and also protects
+ * the state */
struct mutex mutex;
-
+ enum rfkill_state state;
void *data;
int (*toggle_radio)(void *data, enum rfkill_state state);
int (*get_state)(void *data, enum rfkill_state *state);