Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73530
b: refs/heads/master
c: 8a8f1c0
h: refs/heads/master
v: v3
  • Loading branch information
Michael Buesch authored and David S. Miller committed Nov 11, 2007
1 parent bea77a7 commit a425ed6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 8d8c90e3fd1f8895f6d48bdcb34ba69a1fe73616
refs/heads/master: 8a8f1c0437a77cce29c1cb6089f01f22a6d9ca6e
11 changes: 6 additions & 5 deletions trunk/net/rfkill/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,19 +388,20 @@ int rfkill_register(struct rfkill *rfkill)
if (!rfkill->toggle_radio)
return -EINVAL;

snprintf(dev->bus_id, sizeof(dev->bus_id),
"rfkill%ld", (long)atomic_inc_return(&rfkill_no) - 1);

rfkill_led_trigger_register(rfkill);

error = rfkill_add_switch(rfkill);
if (error)
return error;

snprintf(dev->bus_id, sizeof(dev->bus_id),
"rfkill%ld", (long)atomic_inc_return(&rfkill_no) - 1);

error = device_add(dev);
if (error) {
rfkill_remove_switch(rfkill);
return error;
}
rfkill_led_trigger_register(rfkill);

return 0;
}
Expand All @@ -416,9 +417,9 @@ EXPORT_SYMBOL(rfkill_register);
*/
void rfkill_unregister(struct rfkill *rfkill)
{
rfkill_led_trigger_unregister(rfkill);
device_del(&rfkill->dev);
rfkill_remove_switch(rfkill);
rfkill_led_trigger_unregister(rfkill);
put_device(&rfkill->dev);
}
EXPORT_SYMBOL(rfkill_unregister);
Expand Down

0 comments on commit a425ed6

Please sign in to comment.