Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103140
b: refs/heads/master
c: e954b0b
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and John W. Linville committed Jun 26, 2008
1 parent e897c47 commit eae4955
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28f089c18464810ec9e91ee10a89adbb02ad7765
refs/heads/master: e954b0b85b9e737564b8ad9738de5816747b5901
11 changes: 10 additions & 1 deletion trunk/net/rfkill/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ MODULE_LICENSE("GPL");
static LIST_HEAD(rfkill_list); /* list of registered rf switches */
static DEFINE_MUTEX(rfkill_mutex);

static unsigned int rfkill_default_state = RFKILL_STATE_ON;
module_param_named(default_state, rfkill_default_state, uint, 0444);
MODULE_PARM_DESC(default_state,
"Default initial state for all radio types, 0 = radio off");

static enum rfkill_state rfkill_states[RFKILL_TYPE_MAX];


Expand Down Expand Up @@ -436,8 +441,12 @@ static int __init rfkill_init(void)
int error;
int i;

if (rfkill_default_state != RFKILL_STATE_OFF &&
rfkill_default_state != RFKILL_STATE_ON)
return -EINVAL;

for (i = 0; i < ARRAY_SIZE(rfkill_states); i++)
rfkill_states[i] = RFKILL_STATE_ON;
rfkill_states[i] = rfkill_default_state;

error = class_register(&rfkill_class);
if (error) {
Expand Down

0 comments on commit eae4955

Please sign in to comment.