Bluetooth: Use explicit role instead of a bool in function parameters
To make the code more understandable it makes sense to use the new HCI defines for connection role instead of a "bool master" parameter. This makes it immediately clear when looking at the function calls what the last parameter is describing. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
40bef302f6
commit
e804d25d4a
@@ -3154,9 +3154,9 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
|
||||
*/
|
||||
hci_conn_params_add(hdev, &cp->addr.bdaddr, addr_type);
|
||||
|
||||
/* Request a connection with master = true role */
|
||||
conn = hci_connect_le(hdev, &cp->addr.bdaddr, addr_type,
|
||||
sec_level, HCI_LE_CONN_TIMEOUT, true);
|
||||
sec_level, HCI_LE_CONN_TIMEOUT,
|
||||
HCI_ROLE_MASTER);
|
||||
}
|
||||
|
||||
if (IS_ERR(conn)) {
|
||||
|
||||
Reference in New Issue
Block a user