diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-03-27 09:14:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:27 -0400 |
commit | 621cac85297de5ba655e3430b007dd2e0da91da6 (patch) | |
tree | 6193ecf0966094bb744fb4238191bcab03a3cdef /drivers | |
parent | c1c6b14b22af0f85d05a70405dc3fba5de840c7b (diff) |
rfkill: remove user_claim stuff
Almost all drivers do not support user_claim, so remove it
completely and always report -EOPNOTSUPP to userspace. Since
userspace cannot really drive rfkill _anyway_ (due to the
odd restrictions imposed by the documentation) having this
code is just pointless.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/rfkill.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/rfkill.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rfkill.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 4 | ||||
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 1 |
8 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 13d4e6756c99..0607df20e497 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -1267,7 +1267,6 @@ static int ath_init_sw_rfkill(struct ath_softc *sc) | |||
1267 | sc->rf_kill.rfkill->data = sc; | 1267 | sc->rf_kill.rfkill->data = sc; |
1268 | sc->rf_kill.rfkill->toggle_radio = ath_sw_toggle_radio; | 1268 | sc->rf_kill.rfkill->toggle_radio = ath_sw_toggle_radio; |
1269 | sc->rf_kill.rfkill->state = RFKILL_STATE_UNBLOCKED; | 1269 | sc->rf_kill.rfkill->state = RFKILL_STATE_UNBLOCKED; |
1270 | sc->rf_kill.rfkill->user_claim_unsupported = 1; | ||
1271 | 1270 | ||
1272 | return 0; | 1271 | return 0; |
1273 | } | 1272 | } |
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index afad42358693..9e1d00bc24d3 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
@@ -139,7 +139,6 @@ void b43_rfkill_init(struct b43_wldev *dev) | |||
139 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | 139 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; |
140 | rfk->rfkill->data = dev; | 140 | rfk->rfkill->data = dev; |
141 | rfk->rfkill->toggle_radio = b43_rfkill_soft_toggle; | 141 | rfk->rfkill->toggle_radio = b43_rfkill_soft_toggle; |
142 | rfk->rfkill->user_claim_unsupported = 1; | ||
143 | 142 | ||
144 | rfk->poll_dev = input_allocate_polled_device(); | 143 | rfk->poll_dev = input_allocate_polled_device(); |
145 | if (!rfk->poll_dev) { | 144 | if (!rfk->poll_dev) { |
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c index b32bf6a94f19..4b0c7d27a51f 100644 --- a/drivers/net/wireless/b43legacy/rfkill.c +++ b/drivers/net/wireless/b43legacy/rfkill.c | |||
@@ -142,7 +142,6 @@ void b43legacy_rfkill_init(struct b43legacy_wldev *dev) | |||
142 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | 142 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; |
143 | rfk->rfkill->data = dev; | 143 | rfk->rfkill->data = dev; |
144 | rfk->rfkill->toggle_radio = b43legacy_rfkill_soft_toggle; | 144 | rfk->rfkill->toggle_radio = b43legacy_rfkill_soft_toggle; |
145 | rfk->rfkill->user_claim_unsupported = 1; | ||
146 | 145 | ||
147 | rfk->poll_dev = input_allocate_polled_device(); | 146 | rfk->poll_dev = input_allocate_polled_device(); |
148 | if (!rfk->poll_dev) { | 147 | if (!rfk->poll_dev) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c index 2ad9faf1508a..65605ad44e4b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c | |||
@@ -91,7 +91,6 @@ int iwl_rfkill_init(struct iwl_priv *priv) | |||
91 | priv->rfkill->data = priv; | 91 | priv->rfkill->data = priv; |
92 | priv->rfkill->state = RFKILL_STATE_UNBLOCKED; | 92 | priv->rfkill->state = RFKILL_STATE_UNBLOCKED; |
93 | priv->rfkill->toggle_radio = iwl_rfkill_soft_rf_kill; | 93 | priv->rfkill->toggle_radio = iwl_rfkill_soft_rf_kill; |
94 | priv->rfkill->user_claim_unsupported = 1; | ||
95 | 94 | ||
96 | priv->rfkill->dev.class->suspend = NULL; | 95 | priv->rfkill->dev.class->suspend = NULL; |
97 | priv->rfkill->dev.class->resume = NULL; | 96 | priv->rfkill->dev.class->resume = NULL; |
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 0f6e43bf4fc2..62d02b3c998e 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -1005,7 +1005,6 @@ enum rfkill_type type, char *name, u32 cap) | |||
1005 | *data = cap; | 1005 | *data = cap; |
1006 | rfkill_dev->data = data; | 1006 | rfkill_dev->data = data; |
1007 | rfkill_dev->toggle_radio = acer_rfkill_set; | 1007 | rfkill_dev->toggle_radio = acer_rfkill_set; |
1008 | rfkill_dev->user_claim_unsupported = 1; | ||
1009 | 1008 | ||
1010 | err = rfkill_register(rfkill_dev); | 1009 | err = rfkill_register(rfkill_dev); |
1011 | if (err) { | 1010 | if (err) { |
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 50d9019de2be..fe171fad12cf 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -434,7 +434,6 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
434 | wifi_rfkill->name = "hp-wifi"; | 434 | wifi_rfkill->name = "hp-wifi"; |
435 | wifi_rfkill->state = hp_wmi_wifi_state(); | 435 | wifi_rfkill->state = hp_wmi_wifi_state(); |
436 | wifi_rfkill->toggle_radio = hp_wmi_wifi_set; | 436 | wifi_rfkill->toggle_radio = hp_wmi_wifi_set; |
437 | wifi_rfkill->user_claim_unsupported = 1; | ||
438 | err = rfkill_register(wifi_rfkill); | 437 | err = rfkill_register(wifi_rfkill); |
439 | if (err) | 438 | if (err) |
440 | goto add_sysfs_error; | 439 | goto add_sysfs_error; |
@@ -446,7 +445,6 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
446 | bluetooth_rfkill->name = "hp-bluetooth"; | 445 | bluetooth_rfkill->name = "hp-bluetooth"; |
447 | bluetooth_rfkill->state = hp_wmi_bluetooth_state(); | 446 | bluetooth_rfkill->state = hp_wmi_bluetooth_state(); |
448 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; | 447 | bluetooth_rfkill->toggle_radio = hp_wmi_bluetooth_set; |
449 | bluetooth_rfkill->user_claim_unsupported = 1; | ||
450 | err = rfkill_register(bluetooth_rfkill); | 448 | err = rfkill_register(bluetooth_rfkill); |
451 | if (err) | 449 | if (err) |
452 | goto register_bluetooth_error; | 450 | goto register_bluetooth_error; |
@@ -457,7 +455,6 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) | |||
457 | wwan_rfkill->name = "hp-wwan"; | 455 | wwan_rfkill->name = "hp-wwan"; |
458 | wwan_rfkill->state = hp_wmi_wwan_state(); | 456 | wwan_rfkill->state = hp_wmi_wwan_state(); |
459 | wwan_rfkill->toggle_radio = hp_wmi_wwan_set; | 457 | wwan_rfkill->toggle_radio = hp_wmi_wwan_set; |
460 | wwan_rfkill->user_claim_unsupported = 1; | ||
461 | err = rfkill_register(wwan_rfkill); | 458 | err = rfkill_register(wwan_rfkill); |
462 | if (err) | 459 | if (err) |
463 | goto register_wwan_err; | 460 | goto register_wwan_err; |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index d3c92d777bde..184e99e72684 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -1097,7 +1097,6 @@ static int sony_nc_setup_wifi_rfkill(struct acpi_device *device) | |||
1097 | sony_wifi_rfkill->name = "sony-wifi"; | 1097 | sony_wifi_rfkill->name = "sony-wifi"; |
1098 | sony_wifi_rfkill->toggle_radio = sony_nc_rfkill_set; | 1098 | sony_wifi_rfkill->toggle_radio = sony_nc_rfkill_set; |
1099 | sony_wifi_rfkill->get_state = sony_nc_rfkill_get; | 1099 | sony_wifi_rfkill->get_state = sony_nc_rfkill_get; |
1100 | sony_wifi_rfkill->user_claim_unsupported = 1; | ||
1101 | sony_wifi_rfkill->data = (void *)SONY_WIFI; | 1100 | sony_wifi_rfkill->data = (void *)SONY_WIFI; |
1102 | err = rfkill_register(sony_wifi_rfkill); | 1101 | err = rfkill_register(sony_wifi_rfkill); |
1103 | if (err) | 1102 | if (err) |
@@ -1119,7 +1118,6 @@ static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device) | |||
1119 | sony_bluetooth_rfkill->name = "sony-bluetooth"; | 1118 | sony_bluetooth_rfkill->name = "sony-bluetooth"; |
1120 | sony_bluetooth_rfkill->toggle_radio = sony_nc_rfkill_set; | 1119 | sony_bluetooth_rfkill->toggle_radio = sony_nc_rfkill_set; |
1121 | sony_bluetooth_rfkill->get_state = sony_nc_rfkill_get; | 1120 | sony_bluetooth_rfkill->get_state = sony_nc_rfkill_get; |
1122 | sony_bluetooth_rfkill->user_claim_unsupported = 1; | ||
1123 | sony_bluetooth_rfkill->data = (void *)SONY_BLUETOOTH; | 1121 | sony_bluetooth_rfkill->data = (void *)SONY_BLUETOOTH; |
1124 | err = rfkill_register(sony_bluetooth_rfkill); | 1122 | err = rfkill_register(sony_bluetooth_rfkill); |
1125 | if (err) | 1123 | if (err) |
@@ -1140,7 +1138,6 @@ static int sony_nc_setup_wwan_rfkill(struct acpi_device *device) | |||
1140 | sony_wwan_rfkill->name = "sony-wwan"; | 1138 | sony_wwan_rfkill->name = "sony-wwan"; |
1141 | sony_wwan_rfkill->toggle_radio = sony_nc_rfkill_set; | 1139 | sony_wwan_rfkill->toggle_radio = sony_nc_rfkill_set; |
1142 | sony_wwan_rfkill->get_state = sony_nc_rfkill_get; | 1140 | sony_wwan_rfkill->get_state = sony_nc_rfkill_get; |
1143 | sony_wwan_rfkill->user_claim_unsupported = 1; | ||
1144 | sony_wwan_rfkill->data = (void *)SONY_WWAN; | 1141 | sony_wwan_rfkill->data = (void *)SONY_WWAN; |
1145 | err = rfkill_register(sony_wwan_rfkill); | 1142 | err = rfkill_register(sony_wwan_rfkill); |
1146 | if (err) | 1143 | if (err) |
@@ -1161,7 +1158,6 @@ static int sony_nc_setup_wimax_rfkill(struct acpi_device *device) | |||
1161 | sony_wimax_rfkill->name = "sony-wimax"; | 1158 | sony_wimax_rfkill->name = "sony-wimax"; |
1162 | sony_wimax_rfkill->toggle_radio = sony_nc_rfkill_set; | 1159 | sony_wimax_rfkill->toggle_radio = sony_nc_rfkill_set; |
1163 | sony_wimax_rfkill->get_state = sony_nc_rfkill_get; | 1160 | sony_wimax_rfkill->get_state = sony_nc_rfkill_get; |
1164 | sony_wimax_rfkill->user_claim_unsupported = 1; | ||
1165 | sony_wimax_rfkill->data = (void *)SONY_WIMAX; | 1161 | sony_wimax_rfkill->data = (void *)SONY_WIMAX; |
1166 | err = rfkill_register(sony_wimax_rfkill); | 1162 | err = rfkill_register(sony_wimax_rfkill); |
1167 | if (err) | 1163 | if (err) |
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 9f187265db8e..4345089f5171 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -803,7 +803,6 @@ static int __init toshiba_acpi_init(void) | |||
803 | 803 | ||
804 | toshiba_acpi.rfk_dev->name = toshiba_acpi.bt_name; | 804 | toshiba_acpi.rfk_dev->name = toshiba_acpi.bt_name; |
805 | toshiba_acpi.rfk_dev->toggle_radio = bt_rfkill_toggle_radio; | 805 | toshiba_acpi.rfk_dev->toggle_radio = bt_rfkill_toggle_radio; |
806 | toshiba_acpi.rfk_dev->user_claim_unsupported = 1; | ||
807 | toshiba_acpi.rfk_dev->data = &toshiba_acpi; | 806 | toshiba_acpi.rfk_dev->data = &toshiba_acpi; |
808 | 807 | ||
809 | if (hci_get_bt_on(&bt_on) == HCI_SUCCESS && bt_on) { | 808 | if (hci_get_bt_on(&bt_on) == HCI_SUCCESS && bt_on) { |