Skip to content

Commit

Permalink
rt2x00: Only register rfkill input when key is present
Browse files Browse the repository at this point in the history
rt2x00 should only register the RFKILL input device when the hardware indicated
the key was present.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Jan 29, 2009
1 parent 46f2c4b commit 64d7468
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/rt2x00/rt2x00rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
{
struct input_polled_dev *poll_dev;

if (test_bit(RFKILL_STATE_ALLOCATED, &rt2x00dev->rfkill_state))
if (test_bit(RFKILL_STATE_ALLOCATED, &rt2x00dev->rfkill_state) ||
!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags))
return;

poll_dev = input_allocate_polled_device();
Expand Down

0 comments on commit 64d7468

Please sign in to comment.