]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Bluetooth: btmtksdio: move struct reg_read_cmd to common file
authorSean Wang <sean.wang@mediatek.com>
Sun, 9 Jan 2022 19:24:00 +0000 (03:24 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 10 Jan 2022 16:41:39 +0000 (17:41 +0100)
move struct reg_read_cmd to btmtk.h to allow other mtk drivers refer to.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmtk.h
drivers/bluetooth/btmtksdio.c

index fc57ef09d1326f1176102f92c57d612326d5c43b..fb76d9765ce06c69262177db73e4071831f8e2f1 100644 (file)
@@ -87,6 +87,13 @@ struct btmtk_sco {
        u8 channel_select_config;
 } __packed;
 
+struct reg_read_cmd {
+       u8 type;
+       u8 rsv;
+       u8 num;
+       __le32 addr;
+} __packed;
+
 struct reg_write_cmd {
        u8 type;
        u8 rsv;
index a41b5f65e7a9b4960d4e16b10180d7f3a747fd1e..d82ba9d71fb8dd0b4d4be1c37a496c04c59435e3 100644 (file)
@@ -800,12 +800,7 @@ static int mt79xx_setup(struct hci_dev *hdev, const char *fwname)
 static int btmtksdio_mtk_reg_read(struct hci_dev *hdev, u32 reg, u32 *val)
 {
        struct btmtk_hci_wmt_params wmt_params;
-       struct reg_read_cmd {
-               u8 type;
-               u8 rsv;
-               u8 num;
-               __le32 addr;
-       } __packed reg_read = {
+       struct reg_read_cmd reg_read = {
                .type = 1,
                .num = 1,
        };