}
 }
 
+void __hci_req_update_name(struct hci_request *req)
+{
+       struct hci_dev *hdev = req->hdev;
+       struct hci_cp_write_local_name cp;
+
+       memcpy(cp.name, hdev->dev_name, sizeof(cp.name));
+
+       hci_req_add(req, HCI_OP_WRITE_LOCAL_NAME, sizeof(cp), &cp);
+}
+
 void hci_req_add_le_scan_disable(struct hci_request *req)
 {
        struct hci_cp_le_set_scan_enable cp;
 
 struct sk_buff *hci_prepare_cmd(struct hci_dev *hdev, u16 opcode, u32 plen,
                                const void *param);
 
+void __hci_req_update_name(struct hci_request *req);
+
 void hci_req_add_le_scan_disable(struct hci_request *req);
 void hci_req_add_le_passive_scan(struct hci_request *req);
 
 
                                 HCI_OP_USER_PASSKEY_NEG_REPLY, 0);
 }
 
-static void update_name(struct hci_request *req)
-{
-       struct hci_dev *hdev = req->hdev;
-       struct hci_cp_write_local_name cp;
-
-       memcpy(cp.name, hdev->dev_name, sizeof(cp.name));
-
-       hci_req_add(req, HCI_OP_WRITE_LOCAL_NAME, sizeof(cp), &cp);
-}
-
 static void set_name_complete(struct hci_dev *hdev, u8 status, u16 opcode)
 {
        struct mgmt_cp_set_local_name *cp;
        hci_req_init(&req, hdev);
 
        if (lmp_bredr_capable(hdev)) {
-               update_name(&req);
+               __hci_req_update_name(&req);
                update_eir(&req);
        }
 
                        write_fast_connectable(&req, false);
                __hci_req_update_scan(&req);
                __hci_req_update_class(&req);
-               update_name(&req);
+               __hci_req_update_name(&req);
                update_eir(&req);
        }