提交 3fd319b8 编写于 作者: A Andre Guedes 提交者: Gustavo Padovan

Bluetooth: Refactor hci_cc_le_set_scan_enable

This patch does a trivial refactoring in hci_cc_le_set_scan_enable.
Since start and stop discovery command failures are now handled in
mgmt layer, the status check became empty. So, we can move it to
outside the switch statement.
Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 1183fdca
......@@ -949,18 +949,15 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
if (!cp)
return;
if (status)
return;
switch (cp->enable) {
case LE_SCAN_ENABLE:
if (status)
return;
set_bit(HCI_LE_SCAN, &hdev->dev_flags);
break;
case LE_SCAN_DISABLE:
if (status)
return;
clear_bit(HCI_LE_SCAN, &hdev->dev_flags);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册