From: Chris Lu <chris.lu@mediatek.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Luiz Von Dentz <luiz.dentz@gmail.com>
Cc: Sean Wang <sean.wang@mediatek.com>,
Aaron Hou <aaron.hou@mediatek.com>,
Steve Lee <steve.lee@mediatek.com>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mediatek <linux-mediatek@lists.infradead.org>,
Chris Lu <chris.lu@mediatek.com>
Subject: [PATCH v5 3/8] Bluetooth: btmtk: rename btmediatek_data
Date: Wed, 26 Jun 2024 10:53:24 +0800 [thread overview]
Message-ID: <20240626025329.26424-4-chris.lu@mediatek.com> (raw)
In-Reply-To: <20240626025329.26424-1-chris.lu@mediatek.com>
Rename btmediatek_data to have a consistent prefix throughout the driver.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
---
drivers/bluetooth/btmtk.c | 10 +++++-----
drivers/bluetooth/btmtk.h | 2 +-
drivers/bluetooth/btusb.c | 9 ++++-----
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index a27c251bf56e..6489e4a63fb6 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -64,7 +64,7 @@ static void btmtk_coredump(struct hci_dev *hdev)
static void btmtk_coredump_hdr(struct hci_dev *hdev, struct sk_buff *skb)
{
- struct btmediatek_data *data = hci_get_priv(hdev);
+ struct btmtk_data *data = hci_get_priv(hdev);
char buf[80];
snprintf(buf, sizeof(buf), "Controller Name: 0x%X\n",
@@ -85,7 +85,7 @@ static void btmtk_coredump_hdr(struct hci_dev *hdev, struct sk_buff *skb)
static void btmtk_coredump_notify(struct hci_dev *hdev, int state)
{
- struct btmediatek_data *data = hci_get_priv(hdev);
+ struct btmtk_data *data = hci_get_priv(hdev);
switch (state) {
case HCI_DEVCOREDUMP_IDLE:
@@ -355,7 +355,7 @@ EXPORT_SYMBOL_GPL(btmtk_set_bdaddr);
void btmtk_reset_sync(struct hci_dev *hdev)
{
- struct btmediatek_data *reset_work = hci_get_priv(hdev);
+ struct btmtk_data *reset_work = hci_get_priv(hdev);
int err;
hci_dev_lock(hdev);
@@ -371,7 +371,7 @@ EXPORT_SYMBOL_GPL(btmtk_reset_sync);
int btmtk_register_coredump(struct hci_dev *hdev, const char *name,
u32 fw_version)
{
- struct btmediatek_data *data = hci_get_priv(hdev);
+ struct btmtk_data *data = hci_get_priv(hdev);
if (!IS_ENABLED(CONFIG_DEV_COREDUMP))
return -EOPNOTSUPP;
@@ -387,7 +387,7 @@ EXPORT_SYMBOL_GPL(btmtk_register_coredump);
int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
{
- struct btmediatek_data *data = hci_get_priv(hdev);
+ struct btmtk_data *data = hci_get_priv(hdev);
int err;
if (!IS_ENABLED(CONFIG_DEV_COREDUMP)) {
diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h
index e76b8a358be8..dde6fbdeb2b3 100644
--- a/drivers/bluetooth/btmtk.h
+++ b/drivers/bluetooth/btmtk.h
@@ -135,7 +135,7 @@ struct btmtk_coredump_info {
int state;
};
-struct btmediatek_data {
+struct btmtk_data {
u32 dev_id;
btmtk_reset_sync_func_t reset_sync;
struct btmtk_coredump_info cd_info;
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 8239d9c891e6..7612f10f9d39 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3152,7 +3152,7 @@ static int btusb_mtk_subsys_reset(struct hci_dev *hdev, u32 dev_id)
static int btusb_mtk_reset(struct hci_dev *hdev, void *rst_data)
{
struct btusb_data *data = hci_get_drvdata(hdev);
- struct btmediatek_data *mtk_data;
+ struct btmtk_data *btmtk_data = hci_get_priv(hdev);
int err;
/* It's MediaTek specific bluetooth reset mechanism via USB */
@@ -3167,9 +3167,8 @@ static int btusb_mtk_reset(struct hci_dev *hdev, void *rst_data)
btusb_stop_traffic(data);
usb_kill_anchored_urbs(&data->tx_anchor);
- mtk_data = hci_get_priv(hdev);
- err = btusb_mtk_subsys_reset(hdev, mtk_data->dev_id);
+ err = btusb_mtk_subsys_reset(hdev, btmtk_data->dev_id);
usb_queue_reset_device(data->intf);
clear_bit(BTUSB_HW_RESET_ACTIVE, &data->flags);
@@ -3191,7 +3190,7 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
char fw_bin_name[64];
u32 fw_version = 0, fw_flavor = 0;
u8 param;
- struct btmediatek_data *mediatek;
+ struct btmtk_data *mediatek;
calltime = ktime_get();
@@ -4419,7 +4418,7 @@ static int btusb_probe(struct usb_interface *intf,
data->recv_event = btusb_recv_event_realtek;
} else if (id->driver_info & BTUSB_MEDIATEK) {
/* Allocate extra space for Mediatek device */
- priv_size += sizeof(struct btmediatek_data);
+ priv_size += sizeof(struct btmtk_data);
}
data->recv_acl = hci_recv_frame;
--
2.18.0
next prev parent reply other threads:[~2024-06-26 2:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 2:53 [PATCH v5 0/8] Bluetooth: btmtk: MediaTek ISO data transmission support Chris Lu
2024-06-26 2:53 ` [PATCH v5 1/8] Bluetooth: btusb: mediatek: remove the unnecessary goto tag Chris Lu
2024-06-26 2:53 ` [PATCH v5 2/8] Bluetooth: btusb: mediatek: return error code for failed register access Chris Lu
2024-06-26 2:53 ` Chris Lu [this message]
2024-06-26 2:53 ` [PATCH v5 4/8] Bluetooth: btusb: add callback function in btusb suspend/resume Chris Lu
2024-06-26 2:53 ` [PATCH v5 5/8] Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c Chris Lu
2024-06-27 19:13 ` kernel test robot
2024-06-26 2:53 ` [PATCH v5 6/8] Bluetooth: btmtk: move btusb_mtk_[setup, shutdown] " Chris Lu
2024-06-26 2:53 ` [PATCH v5 7/8] Bluetooth: btmtk: move btusb_recv_acl_mtk " Chris Lu
2024-06-26 2:53 ` [PATCH v5 8/8] Bluetooth: btusb: mediatek: add ISO data transmission functions Chris Lu
2024-06-27 16:55 ` kernel test robot
2024-06-27 18:25 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240626025329.26424-4-chris.lu@mediatek.com \
--to=chris.lu@mediatek.com \
--cc=aaron.hou@mediatek.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=sean.wang@mediatek.com \
--cc=steve.lee@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox