Skip to content

Commit

Permalink
Bluetooth: Make hci_unregister_dev return void
Browse files Browse the repository at this point in the history
hci_unregister_dev cannot fail and always returns 0. The drivers already ignore
the return value so we can safely make it return void.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
David Herrmann authored and Gustavo F. Padovan committed Nov 7, 2011
1 parent 13ea401 commit 5973563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst);
struct hci_dev *hci_alloc_dev(void);
void hci_free_dev(struct hci_dev *hdev);
int hci_register_dev(struct hci_dev *hdev);
int hci_unregister_dev(struct hci_dev *hdev);
void hci_unregister_dev(struct hci_dev *hdev);
int hci_suspend_dev(struct hci_dev *hdev);
int hci_resume_dev(struct hci_dev *hdev);
int hci_dev_open(__u16 dev);
Expand Down
4 changes: 1 addition & 3 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ int hci_register_dev(struct hci_dev *hdev)
EXPORT_SYMBOL(hci_register_dev);

/* Unregister HCI device */
int hci_unregister_dev(struct hci_dev *hdev)
void hci_unregister_dev(struct hci_dev *hdev)
{
int i;

Expand Down Expand Up @@ -1583,8 +1583,6 @@ int hci_unregister_dev(struct hci_dev *hdev)
hci_dev_unlock_bh(hdev);

__hci_dev_put(hdev);

return 0;
}
EXPORT_SYMBOL(hci_unregister_dev);

Expand Down

0 comments on commit 5973563

Please sign in to comment.