Skip to content

Commit

Permalink
Bluetooth: btmtkuart: Use serdev_device_write_buf() instead of serdev…
Browse files Browse the repository at this point in the history
…_device_write()

serdev_device_write() is not appropriate at here because
serdev_device_write_wakeup() is not used to release completion hold
by the former at @write_wakeup member of struct serdev_device_ops.

Fix by using serdev_device_write_buf() instead of serdev_device_write().

Signed-off-by: Zijun Hu <zijuhu@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Zijun Hu authored and holtmann committed Jun 1, 2020
1 parent 4942857 commit d3a0fe6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/bluetooth/btmtkuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,7 @@ static int btmtkuart_change_baudrate(struct hci_dev *hdev)

/* Send a dummy byte 0xff to activate the new baudrate */
param = 0xff;
err = serdev_device_write(bdev->serdev, &param, sizeof(param),
MAX_SCHEDULE_TIMEOUT);
err = serdev_device_write_buf(bdev->serdev, &param, sizeof(param));
if (err < 0 || err < sizeof(param))
return err;

Expand Down

0 comments on commit d3a0fe6

Please sign in to comment.