Bluetooth: Use bt_dev_err and bt_dev_info when possible
In case of using BT_ERR and BT_INFO, convert to bt_dev_err and bt_dev_info when possible. This allows for controller specific reporting. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:

committed by
Johan Hedberg

parent
a9ee77af75
commit
2064ee332e
@@ -55,8 +55,8 @@ static int rtl_read_rom_version(struct hci_dev *hdev, u8 *version)
|
||||
}
|
||||
|
||||
rom_version = (struct rtl_rom_version_evt *)skb->data;
|
||||
BT_INFO("%s: rom_version status=%x version=%x",
|
||||
hdev->name, rom_version->status, rom_version->version);
|
||||
bt_dev_info(hdev, "rom_version status=%x version=%x",
|
||||
rom_version->status, rom_version->version);
|
||||
|
||||
*version = rom_version->version;
|
||||
|
||||
@@ -273,7 +273,7 @@ static int rtl_load_config(struct hci_dev *hdev, const char *name, u8 **buff)
|
||||
const struct firmware *fw;
|
||||
int ret;
|
||||
|
||||
BT_INFO("%s: rtl: loading %s", hdev->name, name);
|
||||
bt_dev_info(hdev, "rtl: loading %s", name);
|
||||
ret = request_firmware(&fw, name, &hdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -292,7 +292,7 @@ static int btrtl_setup_rtl8723a(struct hci_dev *hdev)
|
||||
const struct firmware *fw;
|
||||
int ret;
|
||||
|
||||
BT_INFO("%s: rtl: loading rtl_bt/rtl8723a_fw.bin", hdev->name);
|
||||
bt_dev_info(hdev, "rtl: loading rtl_bt/rtl8723a_fw.bin");
|
||||
ret = request_firmware(&fw, "rtl_bt/rtl8723a_fw.bin", &hdev->dev);
|
||||
if (ret < 0) {
|
||||
BT_ERR("%s: Failed to load rtl_bt/rtl8723a_fw.bin", hdev->name);
|
||||
@@ -363,7 +363,7 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev, u16 lmp_subver,
|
||||
} else
|
||||
cfg_sz = 0;
|
||||
|
||||
BT_INFO("%s: rtl: loading %s", hdev->name, fw_name);
|
||||
bt_dev_info(hdev, "rtl: loading %s", fw_name);
|
||||
ret = request_firmware(&fw, fw_name, &hdev->dev);
|
||||
if (ret < 0) {
|
||||
BT_ERR("%s: Failed to load %s", hdev->name, fw_name);
|
||||
@@ -390,7 +390,7 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev, u16 lmp_subver,
|
||||
fw_data = tbuff;
|
||||
}
|
||||
|
||||
BT_INFO("cfg_sz %d, total size %d", cfg_sz, ret);
|
||||
bt_dev_info(hdev, "cfg_sz %d, total size %d", cfg_sz, ret);
|
||||
|
||||
ret = rtl_download_firmware(hdev, fw_data, ret);
|
||||
|
||||
@@ -436,9 +436,10 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
|
||||
return -PTR_ERR(skb);
|
||||
|
||||
resp = (struct hci_rp_read_local_version *)skb->data;
|
||||
BT_INFO("%s: rtl: examining hci_ver=%02x hci_rev=%04x lmp_ver=%02x "
|
||||
"lmp_subver=%04x", hdev->name, resp->hci_ver, resp->hci_rev,
|
||||
resp->lmp_ver, resp->lmp_subver);
|
||||
bt_dev_info(hdev, "rtl: examining hci_ver=%02x hci_rev=%04x "
|
||||
"lmp_ver=%02x lmp_subver=%04x",
|
||||
resp->hci_ver, resp->hci_rev,
|
||||
resp->lmp_ver, resp->lmp_subver);
|
||||
|
||||
lmp_subver = le16_to_cpu(resp->lmp_subver);
|
||||
kfree_skb(skb);
|
||||
@@ -466,7 +467,7 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
|
||||
return btrtl_setup_rtl8723b(hdev, lmp_subver,
|
||||
"rtl_bt/rtl8822b_fw.bin");
|
||||
default:
|
||||
BT_INFO("rtl: assuming no firmware upload needed.");
|
||||
bt_dev_info(hdev, "rtl: assuming no firmware upload needed");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user