diff options
author | Nick Pelly | 2008-12-04 19:37:05 -0600 |
---|---|---|
committer | Arve Hjønnevåg | 2013-02-19 17:49:18 -0600 |
commit | fb492a47c8aa8b1c55d3e21a7efbe64f087dc266 (patch) | |
tree | 9681d70310f233d094a68de8e9b6cafaa61e3ad0 /net | |
parent | bdaa9b99f77fe6c044991c465d11a8d35b68247e (diff) | |
download | kernel-common-fb492a47c8aa8b1c55d3e21a7efbe64f087dc266.tar.gz kernel-common-fb492a47c8aa8b1c55d3e21a7efbe64f087dc266.tar.xz kernel-common-fb492a47c8aa8b1c55d3e21a7efbe64f087dc266.zip |
rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to power down
Some platforms do not want to power down rfkill devices on suspend.
Change-Id: I62a11630521c636d54a4a02ab9037a43435925f5
Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/rfkill/Kconfig | 5 | ||||
-rw-r--r-- | net/rfkill/core.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig index 78efe895b66..8e12c8a2b82 100644 --- a/net/rfkill/Kconfig +++ b/net/rfkill/Kconfig | |||
@@ -10,6 +10,11 @@ menuconfig RFKILL | |||
10 | To compile this driver as a module, choose M here: the | 10 | To compile this driver as a module, choose M here: the |
11 | module will be called rfkill. | 11 | module will be called rfkill. |
12 | 12 | ||
13 | config RFKILL_PM | ||
14 | bool "Power off on suspend" | ||
15 | depends on RFKILL && PM | ||
16 | default y | ||
17 | |||
13 | # LED trigger support | 18 | # LED trigger support |
14 | config RFKILL_LEDS | 19 | config RFKILL_LEDS |
15 | bool | 20 | bool |
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 9b9be5279f5..47982afe2d7 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c | |||
@@ -790,6 +790,7 @@ void rfkill_pause_polling(struct rfkill *rfkill) | |||
790 | } | 790 | } |
791 | EXPORT_SYMBOL(rfkill_pause_polling); | 791 | EXPORT_SYMBOL(rfkill_pause_polling); |
792 | 792 | ||
793 | #ifdef CONFIG_RFKILL_PM | ||
793 | void rfkill_resume_polling(struct rfkill *rfkill) | 794 | void rfkill_resume_polling(struct rfkill *rfkill) |
794 | { | 795 | { |
795 | BUG_ON(!rfkill); | 796 | BUG_ON(!rfkill); |
@@ -824,14 +825,17 @@ static int rfkill_resume(struct device *dev) | |||
824 | 825 | ||
825 | return 0; | 826 | return 0; |
826 | } | 827 | } |
828 | #endif | ||
827 | 829 | ||
828 | static struct class rfkill_class = { | 830 | static struct class rfkill_class = { |
829 | .name = "rfkill", | 831 | .name = "rfkill", |
830 | .dev_release = rfkill_release, | 832 | .dev_release = rfkill_release, |
831 | .dev_attrs = rfkill_dev_attrs, | 833 | .dev_attrs = rfkill_dev_attrs, |
832 | .dev_uevent = rfkill_dev_uevent, | 834 | .dev_uevent = rfkill_dev_uevent, |
835 | #ifdef CONFIG_RFKILL_PM | ||
833 | .suspend = rfkill_suspend, | 836 | .suspend = rfkill_suspend, |
834 | .resume = rfkill_resume, | 837 | .resume = rfkill_resume, |
838 | #endif | ||
835 | }; | 839 | }; |
836 | 840 | ||
837 | bool rfkill_blocked(struct rfkill *rfkill) | 841 | bool rfkill_blocked(struct rfkill *rfkill) |