diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-03-13 10:38:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 15:57:26 -0400 |
commit | 1682fe6de206bd1e937529cbb393915e5ea40b2c (patch) | |
tree | 4890282b3ea30708d27667015664d6b742261277 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | f50e4a8494a74bdbc0f86f1430a4cca2a4f28799 (diff) |
rt2x00: Add suspend/resume handlers to rt2x00rfkill
Add suspend/resume handlers to rt2x00rfkill to have it stop
the input-polldev and prevent it from calling rt2x00 during
suspend period. This could lead to a NULL pointer fault when
rt2x00 suspended, but polldev send a request, because
the csr_addr is NULL.
Also don't let the rfkill allocation/registration block
the initialization of the entire device. Just print a warning
and continue as if nothing happened.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 05927b908f80..6c725422af5a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -620,6 +620,9 @@ struct rt2x00_dev { | |||
620 | * This will only be compiled in when required. | 620 | * This will only be compiled in when required. |
621 | */ | 621 | */ |
622 | #ifdef CONFIG_RT2X00_LIB_RFKILL | 622 | #ifdef CONFIG_RT2X00_LIB_RFKILL |
623 | unsigned long rfkill_state; | ||
624 | #define RFKILL_STATE_ALLOCATED 1 | ||
625 | #define RFKILL_STATE_REGISTERED 2 | ||
623 | struct rfkill *rfkill; | 626 | struct rfkill *rfkill; |
624 | struct input_polled_dev *poll_dev; | 627 | struct input_polled_dev *poll_dev; |
625 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | 628 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ |