mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
Bluetooth: hci_bcm: Use bt_dev logging helpers
Replace BT_ logging calls by the new bt_dev ones. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
bb3ea16a44
commit
65ad07c9e5
@ -80,7 +80,7 @@ static int bcm_set_baudrate(struct hci_uart *hu, unsigned int speed)
|
|||||||
|
|
||||||
clock.type = BCM_UART_CLOCK_48MHZ;
|
clock.type = BCM_UART_CLOCK_48MHZ;
|
||||||
|
|
||||||
BT_DBG("%s: Set Controller clock (%d)", hdev->name, clock.type);
|
bt_dev_dbg(hdev, "Set Controller clock (%d)", clock.type);
|
||||||
|
|
||||||
/* This Broadcom specific command changes the UART's controller
|
/* This Broadcom specific command changes the UART's controller
|
||||||
* clock for baud rate > 3000000.
|
* clock for baud rate > 3000000.
|
||||||
@ -88,15 +88,15 @@ static int bcm_set_baudrate(struct hci_uart *hu, unsigned int speed)
|
|||||||
skb = __hci_cmd_sync(hdev, 0xfc45, 1, &clock, HCI_INIT_TIMEOUT);
|
skb = __hci_cmd_sync(hdev, 0xfc45, 1, &clock, HCI_INIT_TIMEOUT);
|
||||||
if (IS_ERR(skb)) {
|
if (IS_ERR(skb)) {
|
||||||
int err = PTR_ERR(skb);
|
int err = PTR_ERR(skb);
|
||||||
BT_ERR("%s: BCM: failed to write clock command (%d)",
|
bt_dev_err(hdev, "BCM: failed to write clock (%d)",
|
||||||
hdev->name, err);
|
err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
BT_DBG("%s: Set Controller UART speed to %d bit/s", hdev->name, speed);
|
bt_dev_dbg(hdev, "Set Controller UART speed to %d bit/s", speed);
|
||||||
|
|
||||||
param.zero = cpu_to_le16(0);
|
param.zero = cpu_to_le16(0);
|
||||||
param.baud_rate = cpu_to_le32(speed);
|
param.baud_rate = cpu_to_le32(speed);
|
||||||
@ -108,8 +108,8 @@ static int bcm_set_baudrate(struct hci_uart *hu, unsigned int speed)
|
|||||||
HCI_INIT_TIMEOUT);
|
HCI_INIT_TIMEOUT);
|
||||||
if (IS_ERR(skb)) {
|
if (IS_ERR(skb)) {
|
||||||
int err = PTR_ERR(skb);
|
int err = PTR_ERR(skb);
|
||||||
BT_ERR("%s: BCM: failed to write update baudrate command (%d)",
|
bt_dev_err(hdev, "BCM: failed to write update baudrate (%d)",
|
||||||
hdev->name, err);
|
err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ static int bcm_open(struct hci_uart *hu)
|
|||||||
struct bcm_data *bcm;
|
struct bcm_data *bcm;
|
||||||
struct list_head *p;
|
struct list_head *p;
|
||||||
|
|
||||||
BT_DBG("hu %p", hu);
|
bt_dev_dbg(hu->hdev, "hu %p", hu);
|
||||||
|
|
||||||
bcm = kzalloc(sizeof(*bcm), GFP_KERNEL);
|
bcm = kzalloc(sizeof(*bcm), GFP_KERNEL);
|
||||||
if (!bcm)
|
if (!bcm)
|
||||||
@ -194,7 +194,7 @@ static int bcm_close(struct hci_uart *hu)
|
|||||||
{
|
{
|
||||||
struct bcm_data *bcm = hu->priv;
|
struct bcm_data *bcm = hu->priv;
|
||||||
|
|
||||||
BT_DBG("hu %p", hu);
|
bt_dev_dbg(hu->hdev, "hu %p", hu);
|
||||||
|
|
||||||
/* Protect bcm->dev against removal of the device or driver */
|
/* Protect bcm->dev against removal of the device or driver */
|
||||||
mutex_lock(&bcm_device_lock);
|
mutex_lock(&bcm_device_lock);
|
||||||
@ -218,7 +218,7 @@ static int bcm_flush(struct hci_uart *hu)
|
|||||||
{
|
{
|
||||||
struct bcm_data *bcm = hu->priv;
|
struct bcm_data *bcm = hu->priv;
|
||||||
|
|
||||||
BT_DBG("hu %p", hu);
|
bt_dev_dbg(hu->hdev, "hu %p", hu);
|
||||||
|
|
||||||
skb_queue_purge(&bcm->txq);
|
skb_queue_purge(&bcm->txq);
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ static int bcm_setup(struct hci_uart *hu)
|
|||||||
unsigned int speed;
|
unsigned int speed;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
BT_DBG("hu %p", hu);
|
bt_dev_dbg(hu->hdev, "hu %p", hu);
|
||||||
|
|
||||||
hu->hdev->set_bdaddr = btbcm_set_bdaddr;
|
hu->hdev->set_bdaddr = btbcm_set_bdaddr;
|
||||||
|
|
||||||
@ -242,13 +242,13 @@ static int bcm_setup(struct hci_uart *hu)
|
|||||||
|
|
||||||
err = request_firmware(&fw, fw_name, &hu->hdev->dev);
|
err = request_firmware(&fw, fw_name, &hu->hdev->dev);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
BT_INFO("%s: BCM: Patch %s not found", hu->hdev->name, fw_name);
|
bt_dev_info(hu->hdev, "BCM: Patch %s not found", fw_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = btbcm_patchram(hu->hdev, fw);
|
err = btbcm_patchram(hu->hdev, fw);
|
||||||
if (err) {
|
if (err) {
|
||||||
BT_INFO("%s: BCM: Patch failed (%d)", hu->hdev->name, err);
|
bt_dev_info(hu->hdev, "BCM: Patch failed (%d)", err);
|
||||||
goto finalize;
|
goto finalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ static int bcm_recv(struct hci_uart *hu, const void *data, int count)
|
|||||||
bcm_recv_pkts, ARRAY_SIZE(bcm_recv_pkts));
|
bcm_recv_pkts, ARRAY_SIZE(bcm_recv_pkts));
|
||||||
if (IS_ERR(bcm->rx_skb)) {
|
if (IS_ERR(bcm->rx_skb)) {
|
||||||
int err = PTR_ERR(bcm->rx_skb);
|
int err = PTR_ERR(bcm->rx_skb);
|
||||||
BT_ERR("%s: Frame reassembly failed (%d)", hu->hdev->name, err);
|
bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
|
||||||
bcm->rx_skb = NULL;
|
bcm->rx_skb = NULL;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ static int bcm_enqueue(struct hci_uart *hu, struct sk_buff *skb)
|
|||||||
{
|
{
|
||||||
struct bcm_data *bcm = hu->priv;
|
struct bcm_data *bcm = hu->priv;
|
||||||
|
|
||||||
BT_DBG("hu %p skb %p", hu, skb);
|
bt_dev_dbg(hu->hdev, "hu %p skb %p", hu, skb);
|
||||||
|
|
||||||
/* Prepend skb with frame type */
|
/* Prepend skb with frame type */
|
||||||
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
|
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
|
||||||
@ -336,7 +336,7 @@ static int bcm_suspend(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
|
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
|
||||||
|
|
||||||
BT_DBG("suspend (%p): is_suspended %d", bdev, bdev->is_suspended);
|
bt_dev_dbg(bdev, "suspend: is_suspended %d", bdev->is_suspended);
|
||||||
|
|
||||||
mutex_lock(&bcm_device_lock);
|
mutex_lock(&bcm_device_lock);
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ static int bcm_suspend(struct device *dev)
|
|||||||
/* Suspend the device */
|
/* Suspend the device */
|
||||||
if (bdev->device_wakeup) {
|
if (bdev->device_wakeup) {
|
||||||
gpiod_set_value(bdev->device_wakeup, false);
|
gpiod_set_value(bdev->device_wakeup, false);
|
||||||
BT_DBG("suspend, delaying 15 ms");
|
bt_dev_dbg(bdev, "suspend, delaying 15 ms");
|
||||||
mdelay(15);
|
mdelay(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ static int bcm_resume(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
|
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
|
||||||
|
|
||||||
BT_DBG("resume (%p): is_suspended %d", bdev, bdev->is_suspended);
|
bt_dev_dbg(bdev, "resume: is_suspended %d", bdev->is_suspended);
|
||||||
|
|
||||||
mutex_lock(&bcm_device_lock);
|
mutex_lock(&bcm_device_lock);
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ static int bcm_resume(struct device *dev)
|
|||||||
|
|
||||||
if (bdev->device_wakeup) {
|
if (bdev->device_wakeup) {
|
||||||
gpiod_set_value(bdev->device_wakeup, true);
|
gpiod_set_value(bdev->device_wakeup, true);
|
||||||
BT_DBG("resume, delaying 15 ms");
|
bt_dev_dbg(bdev, "resume, delaying 15 ms");
|
||||||
mdelay(15);
|
mdelay(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user