Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121574
b: refs/heads/master
c: 68d2413
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and John W. Linville committed Oct 31, 2008
1 parent ab6f2d4 commit a4f749d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf4b4aab552f5f658ed400dd0cd41f9ac8aac7c1
refs/heads/master: 68d2413bec7e1d97e906eafb05e78d925a5ca128
1 change: 1 addition & 0 deletions trunk/net/rfkill/rfkill-input.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state);
void rfkill_epo(void);
void rfkill_restore_states(void);
enum rfkill_state rfkill_get_global_state(const enum rfkill_type type);

#endif /* __RFKILL_INPUT_H */
14 changes: 14 additions & 0 deletions trunk/net/rfkill/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,19 @@ void rfkill_restore_states(void)
}
EXPORT_SYMBOL_GPL(rfkill_restore_states);

/**
* rfkill_get_global_state - returns global state for a type
* @type: the type to get the global state of
*
* Returns the current global state for a given wireless
* device type.
*/
enum rfkill_state rfkill_get_global_state(const enum rfkill_type type)
{
return rfkill_global_states[type].current_state;
}
EXPORT_SYMBOL_GPL(rfkill_get_global_state);

/**
* rfkill_force_state - Force the internal rfkill radio state
* @rfkill: pointer to the rfkill class to modify.
Expand Down Expand Up @@ -834,6 +847,7 @@ int rfkill_set_default(enum rfkill_type type, enum rfkill_state state)

if (!test_and_set_bit(type, rfkill_states_lockdflt)) {
rfkill_global_states[type].default_state = state;
rfkill_global_states[type].current_state = state;
error = 0;
} else
error = -EPERM;
Expand Down

0 comments on commit a4f749d

Please sign in to comment.