Commit 53005a0a authored by Mattia Dongili's avatar Mattia Dongili Committed by Len Brown

sony-laptop: always try to unblock rfkill on load

This fixes an inconsistent behaviour when loading the driver with the
switch on or off. In the former case you would also need to soft unblock
the switch via the sysfs file entries to really disable rfkill, in the
latter you wouldn't.
Signed-off-by: default avatarMattia Dongili <malattia@linux.it>
Cc: Matthias Welwarsky <matze@welwarsky.de>
Acked-by: default avatarMatthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent c35d4b35
...@@ -1103,8 +1103,11 @@ static int sony_nc_setup_wifi_rfkill(struct acpi_device *device) ...@@ -1103,8 +1103,11 @@ static int sony_nc_setup_wifi_rfkill(struct acpi_device *device)
err = rfkill_register(sony_wifi_rfkill); err = rfkill_register(sony_wifi_rfkill);
if (err) if (err)
rfkill_free(sony_wifi_rfkill); rfkill_free(sony_wifi_rfkill);
else else {
sony_rfkill_devices[SONY_WIFI] = sony_wifi_rfkill; sony_rfkill_devices[SONY_WIFI] = sony_wifi_rfkill;
sony_nc_rfkill_set(sony_wifi_rfkill->data,
RFKILL_STATE_UNBLOCKED);
}
return err; return err;
} }
...@@ -1125,8 +1128,11 @@ static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device) ...@@ -1125,8 +1128,11 @@ static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device)
err = rfkill_register(sony_bluetooth_rfkill); err = rfkill_register(sony_bluetooth_rfkill);
if (err) if (err)
rfkill_free(sony_bluetooth_rfkill); rfkill_free(sony_bluetooth_rfkill);
else else {
sony_rfkill_devices[SONY_BLUETOOTH] = sony_bluetooth_rfkill; sony_rfkill_devices[SONY_BLUETOOTH] = sony_bluetooth_rfkill;
sony_nc_rfkill_set(sony_bluetooth_rfkill->data,
RFKILL_STATE_UNBLOCKED);
}
return err; return err;
} }
...@@ -1146,8 +1152,11 @@ static int sony_nc_setup_wwan_rfkill(struct acpi_device *device) ...@@ -1146,8 +1152,11 @@ static int sony_nc_setup_wwan_rfkill(struct acpi_device *device)
err = rfkill_register(sony_wwan_rfkill); err = rfkill_register(sony_wwan_rfkill);
if (err) if (err)
rfkill_free(sony_wwan_rfkill); rfkill_free(sony_wwan_rfkill);
else else {
sony_rfkill_devices[SONY_WWAN] = sony_wwan_rfkill; sony_rfkill_devices[SONY_WWAN] = sony_wwan_rfkill;
sony_nc_rfkill_set(sony_wwan_rfkill->data,
RFKILL_STATE_UNBLOCKED);
}
return err; return err;
} }
...@@ -1167,8 +1176,11 @@ static int sony_nc_setup_wimax_rfkill(struct acpi_device *device) ...@@ -1167,8 +1176,11 @@ static int sony_nc_setup_wimax_rfkill(struct acpi_device *device)
err = rfkill_register(sony_wimax_rfkill); err = rfkill_register(sony_wimax_rfkill);
if (err) if (err)
rfkill_free(sony_wimax_rfkill); rfkill_free(sony_wimax_rfkill);
else else {
sony_rfkill_devices[SONY_WIMAX] = sony_wimax_rfkill; sony_rfkill_devices[SONY_WIMAX] = sony_wimax_rfkill;
sony_nc_rfkill_set(sony_wimax_rfkill->data,
RFKILL_STATE_UNBLOCKED);
}
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment