From: Ivo van Doorn Date: Wed, 7 Jan 2009 13:51:41 +0000 (+0100) Subject: rt2x00: Only register rfkill input when key is present X-Git-Tag: v2.6.30-rc1~662^2~836^2~189 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64d74681433415855da02d2516f28d2ed859cde9;p=profile%2Fivi%2Fkernel-x86-ivi.git rt2x00: Only register rfkill input when key is present rt2x00 should only register the RFKILL input device when the hardware indicated the key was present. Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt2x00rfkill.c b/drivers/net/wireless/rt2x00/rt2x00rfkill.c index 595efd0..53f64b7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00rfkill.c +++ b/drivers/net/wireless/rt2x00/rt2x00rfkill.c @@ -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();