Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177528
b: refs/heads/master
c: 4311bb2
h: refs/heads/master
v: v3
  • Loading branch information
Alan Jenkins authored and Len Brown committed Dec 10, 2009
1 parent 3b21c74 commit 10ba9f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71e9dc73cb6b1351bdd5f732cef5dbef411b3219
refs/heads/master: 4311bb230e0f7e4daa5fd5bc0cc536e2bd1eff20
30 changes: 18 additions & 12 deletions trunk/drivers/platform/x86/dell-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ static int dell_setup_rfkill(void)
return ret;
}

static void dell_cleanup_rfkill(void)
{
if (wifi_rfkill) {
rfkill_unregister(wifi_rfkill);
rfkill_destroy(wifi_rfkill);
}
if (bluetooth_rfkill) {
rfkill_unregister(bluetooth_rfkill);
rfkill_destroy(bluetooth_rfkill);
}
if (wwan_rfkill) {
rfkill_unregister(wwan_rfkill);
rfkill_destroy(wwan_rfkill);
}
}

static int dell_send_intensity(struct backlight_device *bd)
{
struct calling_interface_buffer buffer;
Expand Down Expand Up @@ -370,12 +386,7 @@ static int __init dell_init(void)
return 0;

fail_backlight:
if (wifi_rfkill)
rfkill_unregister(wifi_rfkill);
if (bluetooth_rfkill)
rfkill_unregister(bluetooth_rfkill);
if (wwan_rfkill)
rfkill_unregister(wwan_rfkill);
dell_cleanup_rfkill();
fail_rfkill:
kfree(da_tokens);
return ret;
Expand All @@ -384,12 +395,7 @@ static int __init dell_init(void)
static void __exit dell_exit(void)
{
backlight_device_unregister(dell_backlight_device);
if (wifi_rfkill)
rfkill_unregister(wifi_rfkill);
if (bluetooth_rfkill)
rfkill_unregister(bluetooth_rfkill);
if (wwan_rfkill)
rfkill_unregister(wwan_rfkill);
dell_cleanup_rfkill();
}

module_init(dell_init);
Expand Down

0 comments on commit 10ba9f6

Please sign in to comment.