Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88393C4332F for ; Sat, 18 Dec 2021 01:09:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231613AbhLRBJG (ORCPT ); Fri, 17 Dec 2021 20:09:06 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:51892 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231573AbhLRBJD (ORCPT ); Fri, 17 Dec 2021 20:09:03 -0500 X-UUID: 3b317627985d4d47925dfb618e668cc4-20211218 X-UUID: 3b317627985d4d47925dfb618e668cc4-20211218 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1963180912; Sat, 18 Dec 2021 09:09:00 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 18 Dec 2021 09:08:58 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 18 Dec 2021 09:08:58 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 18 Dec 2021 09:08:57 +0800 From: To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH 3/3] Bluetooth: btmtksdio: move struct reg_read_cmd to common file Date: Sat, 18 Dec 2021 09:08:53 +0800 Message-ID: <35a5f37a702aa21383092534f42c01fa55eaddb0.1639787634.git.objelf@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <632534014b9b8a38e81dfb5749dcd75e2088adb1.1639787634.git.objelf@gmail.com> References: <632534014b9b8a38e81dfb5749dcd75e2088adb1.1639787634.git.objelf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang move struct reg_read_cmd to btmtk.h to allow other mtk drivers refer to. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtk.h | 7 +++++++ drivers/bluetooth/btmtksdio.c | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h index fc57ef09d132..fb76d9765ce0 100644 --- a/drivers/bluetooth/btmtk.h +++ b/drivers/bluetooth/btmtk.h @@ -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; diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 8e4d8c2da824..884678a3951d 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -800,12 +800,7 @@ static int mt79xx_setup(struct hci_dev *hdev, const char *fwname) static int btsdio_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, }; -- 2.25.1