diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-04-22 08:39:59 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo@padovan.org> | 2012-05-09 00:40:40 -0400 |
commit | d8ce9395252fa9a264c04e7ab9949f4f7ec96f5b (patch) | |
tree | 8bcf99169d1db646d0a0485237b9cf6ef0f77e15 /net/bluetooth | |
parent | b1b813d4777f4843af2acce9a1b62d486e1d3ffc (diff) |
Bluetooth: Remove unneeded initialization in hci_alloc_dev()
We allocate memory with kzalloc() so there is no need to call
memset(..., 0, ...) or similar.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index a362f01bf081..aa45ea496f87 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1713,20 +1713,16 @@ int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window, | |||
1713 | struct hci_dev *hci_alloc_dev(void) | 1713 | struct hci_dev *hci_alloc_dev(void) |
1714 | { | 1714 | { |
1715 | struct hci_dev *hdev; | 1715 | struct hci_dev *hdev; |
1716 | int i; | ||
1717 | 1716 | ||
1718 | hdev = kzalloc(sizeof(struct hci_dev), GFP_KERNEL); | 1717 | hdev = kzalloc(sizeof(struct hci_dev), GFP_KERNEL); |
1719 | if (!hdev) | 1718 | if (!hdev) |
1720 | return NULL; | 1719 | return NULL; |
1721 | 1720 | ||
1722 | hdev->flags = 0; | ||
1723 | hdev->dev_flags = 0; | ||
1724 | hdev->pkt_type = (HCI_DM1 | HCI_DH1 | HCI_HV1); | 1721 | hdev->pkt_type = (HCI_DM1 | HCI_DH1 | HCI_HV1); |
1725 | hdev->esco_type = (ESCO_HV1); | 1722 | hdev->esco_type = (ESCO_HV1); |
1726 | hdev->link_mode = (HCI_LM_ACCEPT); | 1723 | hdev->link_mode = (HCI_LM_ACCEPT); |
1727 | hdev->io_capability = 0x03; /* No Input No Output */ | 1724 | hdev->io_capability = 0x03; /* No Input No Output */ |
1728 | 1725 | ||
1729 | hdev->idle_timeout = 0; | ||
1730 | hdev->sniff_max_interval = 800; | 1726 | hdev->sniff_max_interval = 800; |
1731 | hdev->sniff_min_interval = 80; | 1727 | hdev->sniff_min_interval = 80; |
1732 | 1728 | ||
@@ -1761,12 +1757,6 @@ struct hci_dev *hci_alloc_dev(void) | |||
1761 | 1757 | ||
1762 | setup_timer(&hdev->cmd_timer, hci_cmd_timer, (unsigned long) hdev); | 1758 | setup_timer(&hdev->cmd_timer, hci_cmd_timer, (unsigned long) hdev); |
1763 | 1759 | ||
1764 | memset(&hdev->stat, 0, sizeof(struct hci_dev_stats)); | ||
1765 | atomic_set(&hdev->promisc, 0); | ||
1766 | |||
1767 | for (i = 0; i < NUM_REASSEMBLY; i++) | ||
1768 | hdev->reassembly[i] = NULL; | ||
1769 | |||
1770 | hci_init_sysfs(hdev); | 1760 | hci_init_sysfs(hdev); |
1771 | discovery_init(hdev); | 1761 | discovery_init(hdev); |
1772 | hci_conn_hash_init(hdev); | 1762 | hci_conn_hash_init(hdev); |