summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorChris Lu <chris.lu@mediatek.com>2025-01-08 17:50:28 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-17 13:40:39 +0100
commitcd4522bd3632489626d09b3d197fa887cf623c74 (patch)
tree237ef21d8ddef22141923af0f739ddea50b3821e /net
parent49cd0ccacc7d76fb088ee40bb31d4b0f6af828c9 (diff)
downloadlinux-cd4522bd3632489626d09b3d197fa887cf623c74.tar.gz
linux-cd4522bd3632489626d09b3d197fa887cf623c74.tar.bz2
linux-cd4522bd3632489626d09b3d197fa887cf623c74.zip
Bluetooth: btmtk: Fix failed to send func ctrl for MediaTek devices.
[ Upstream commit 67dba2c28fe0af7e25ea1aeade677162ed05310a ] Use usb_autopm_get_interface() and usb_autopm_put_interface() in btmtk_usb_shutdown(), it could send func ctrl after enabling autosuspend. Bluetooth: btmtk_usb_hci_wmt_sync() hci0: Execution of wmt command timed out Bluetooth: btmtk_usb_shutdown() hci0: Failed to send wmt func ctrl (-110) Fixes: 5c5e8c52e3ca ("Bluetooth: btmtk: move btusb_mtk_[setup, shutdown] to btmtk.c") Signed-off-by: Chris Lu <chris.lu@mediatek.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/rfcomm/tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index af80d599c337..21a5b5535ebc 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -201,14 +201,14 @@ static ssize_t address_show(struct device *tty_dev,
struct device_attribute *attr, char *buf)
{
struct rfcomm_dev *dev = dev_get_drvdata(tty_dev);
- return sprintf(buf, "%pMR\n", &dev->dst);
+ return sysfs_emit(buf, "%pMR\n", &dev->dst);
}
static ssize_t channel_show(struct device *tty_dev,
struct device_attribute *attr, char *buf)
{
struct rfcomm_dev *dev = dev_get_drvdata(tty_dev);
- return sprintf(buf, "%d\n", dev->channel);
+ return sysfs_emit(buf, "%d\n", dev->channel);
}
static DEVICE_ATTR_RO(address);