aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNick Pelly2008-12-04 19:37:05 -0600
committerArve Hjønnevåg2013-02-19 17:49:18 -0600
commitfb492a47c8aa8b1c55d3e21a7efbe64f087dc266 (patch)
tree9681d70310f233d094a68de8e9b6cafaa61e3ad0 /net
parentbdaa9b99f77fe6c044991c465d11a8d35b68247e (diff)
downloadkernel-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/Kconfig5
-rw-r--r--net/rfkill/core.c4
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
13config 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
14config RFKILL_LEDS 19config 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}
791EXPORT_SYMBOL(rfkill_pause_polling); 791EXPORT_SYMBOL(rfkill_pause_polling);
792 792
793#ifdef CONFIG_RFKILL_PM
793void rfkill_resume_polling(struct rfkill *rfkill) 794void 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
828static struct class rfkill_class = { 830static 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
837bool rfkill_blocked(struct rfkill *rfkill) 841bool rfkill_blocked(struct rfkill *rfkill)