aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill
diff options
context:
space:
mode:
Diffstat (limited to 'net/rfkill')
-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 be90640a277..df2dae6b272 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -769,6 +769,7 @@ void rfkill_pause_polling(struct rfkill *rfkill)
769} 769}
770EXPORT_SYMBOL(rfkill_pause_polling); 770EXPORT_SYMBOL(rfkill_pause_polling);
771 771
772#ifdef CONFIG_RFKILL_PM
772void rfkill_resume_polling(struct rfkill *rfkill) 773void rfkill_resume_polling(struct rfkill *rfkill)
773{ 774{
774 BUG_ON(!rfkill); 775 BUG_ON(!rfkill);
@@ -803,14 +804,17 @@ static int rfkill_resume(struct device *dev)
803 804
804 return 0; 805 return 0;
805} 806}
807#endif
806 808
807static struct class rfkill_class = { 809static struct class rfkill_class = {
808 .name = "rfkill", 810 .name = "rfkill",
809 .dev_release = rfkill_release, 811 .dev_release = rfkill_release,
810 .dev_attrs = rfkill_dev_attrs, 812 .dev_attrs = rfkill_dev_attrs,
811 .dev_uevent = rfkill_dev_uevent, 813 .dev_uevent = rfkill_dev_uevent,
814#ifdef CONFIG_RFKILL_PM
812 .suspend = rfkill_suspend, 815 .suspend = rfkill_suspend,
813 .resume = rfkill_resume, 816 .resume = rfkill_resume,
817#endif
814}; 818};
815 819
816bool rfkill_blocked(struct rfkill *rfkill) 820bool rfkill_blocked(struct rfkill *rfkill)