Bluetooth: btintel: Clean the exported function to static

This patch changes the exported functions to static if they are no
longer used by others.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Tedd Ho-Jeong An 2021-08-04 17:32:17 -07:00 committed by Marcel Holtmann
parent 3df4dfbec0
commit 0d8603b4ee
2 changed files with 31 additions and 92 deletions

View File

@ -131,6 +131,26 @@ int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
} }
EXPORT_SYMBOL_GPL(btintel_set_bdaddr); EXPORT_SYMBOL_GPL(btintel_set_bdaddr);
static int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
{
u8 mask[8] = { 0x87, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
struct sk_buff *skb;
int err;
if (debug)
mask[1] |= 0x62;
skb = __hci_cmd_sync(hdev, 0xfc52, 8, mask, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
bt_dev_err(hdev, "Setting Intel event mask failed (%d)", err);
return err;
}
kfree_skb(skb);
return 0;
}
int btintel_set_diag(struct hci_dev *hdev, bool enable) int btintel_set_diag(struct hci_dev *hdev, bool enable)
{ {
struct sk_buff *skb; struct sk_buff *skb;
@ -198,7 +218,7 @@ static int btintel_set_diag_combined(struct hci_dev *hdev, bool enable)
return ret; return ret;
} }
void btintel_hw_error(struct hci_dev *hdev, u8 code) static void btintel_hw_error(struct hci_dev *hdev, u8 code)
{ {
struct sk_buff *skb; struct sk_buff *skb;
u8 type = 0x00; u8 type = 0x00;
@ -230,7 +250,6 @@ void btintel_hw_error(struct hci_dev *hdev, u8 code)
kfree_skb(skb); kfree_skb(skb);
} }
EXPORT_SYMBOL_GPL(btintel_hw_error);
int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver) int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
{ {
@ -294,7 +313,7 @@ int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
} }
EXPORT_SYMBOL_GPL(btintel_version_info); EXPORT_SYMBOL_GPL(btintel_version_info);
int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen, static int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
const void *param) const void *param)
{ {
while (plen > 0) { while (plen > 0) {
@ -317,7 +336,6 @@ int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_secure_send);
int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name) int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name)
{ {
@ -364,27 +382,6 @@ int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name)
} }
EXPORT_SYMBOL_GPL(btintel_load_ddc_config); EXPORT_SYMBOL_GPL(btintel_load_ddc_config);
int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
{
u8 mask[8] = { 0x87, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
struct sk_buff *skb;
int err;
if (debug)
mask[1] |= 0x62;
skb = __hci_cmd_sync(hdev, 0xfc52, 8, mask, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
bt_dev_err(hdev, "Setting Intel event mask failed (%d)", err);
return err;
}
kfree_skb(skb);
return 0;
}
EXPORT_SYMBOL_GPL(btintel_set_event_mask);
int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug) int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
{ {
int err, ret; int err, ret;
@ -428,7 +425,8 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
} }
EXPORT_SYMBOL_GPL(btintel_read_version); EXPORT_SYMBOL_GPL(btintel_read_version);
int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *version) static int btintel_version_info_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version)
{ {
const char *variant; const char *variant;
@ -505,7 +503,6 @@ int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_version_info_tlv);
static int btintel_parse_version_tlv(struct hci_dev *hdev, static int btintel_parse_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version, struct intel_version_tlv *version,
@ -609,7 +606,8 @@ static int btintel_parse_version_tlv(struct hci_dev *hdev,
return 0; return 0;
} }
int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *version) static int btintel_read_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version)
{ {
struct sk_buff *skb; struct sk_buff *skb;
const u8 param[1] = { 0xFF }; const u8 param[1] = { 0xFF };
@ -636,7 +634,6 @@ int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
kfree_skb(skb); kfree_skb(skb);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_read_version_tlv);
/* ------- REGMAP IBT SUPPORT ------- */ /* ------- REGMAP IBT SUPPORT ------- */
@ -1210,7 +1207,7 @@ static int btintel_download_fw_tlv(struct hci_dev *hdev,
return 0; return 0;
} }
void btintel_reset_to_bootloader(struct hci_dev *hdev) static void btintel_reset_to_bootloader(struct hci_dev *hdev)
{ {
struct intel_reset params; struct intel_reset params;
struct sk_buff *skb; struct sk_buff *skb;
@ -1253,9 +1250,8 @@ void btintel_reset_to_bootloader(struct hci_dev *hdev)
*/ */
msleep(150); msleep(150);
} }
EXPORT_SYMBOL_GPL(btintel_reset_to_bootloader);
int btintel_read_debug_features(struct hci_dev *hdev, static int btintel_read_debug_features(struct hci_dev *hdev,
struct intel_debug_features *features) struct intel_debug_features *features)
{ {
struct sk_buff *skb; struct sk_buff *skb;
@ -1285,9 +1281,8 @@ int btintel_read_debug_features(struct hci_dev *hdev,
kfree_skb(skb); kfree_skb(skb);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_read_debug_features);
int btintel_set_debug_features(struct hci_dev *hdev, static int btintel_set_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features) const struct intel_debug_features *features)
{ {
u8 mask[11] = { 0x0a, 0x92, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, u8 mask[11] = { 0x0a, 0x92, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00,
@ -1312,7 +1307,6 @@ int btintel_set_debug_features(struct hci_dev *hdev,
kfree_skb(skb); kfree_skb(skb);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_set_debug_features);
static const struct firmware *btintel_legacy_rom_get_fw(struct hci_dev *hdev, static const struct firmware *btintel_legacy_rom_get_fw(struct hci_dev *hdev,
struct intel_version *ver) struct intel_version *ver)

View File

@ -188,18 +188,11 @@ int btintel_enter_mfg(struct hci_dev *hdev);
int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched); int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched);
int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr); int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
int btintel_set_diag(struct hci_dev *hdev, bool enable); int btintel_set_diag(struct hci_dev *hdev, bool enable);
void btintel_hw_error(struct hci_dev *hdev, u8 code);
int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver); int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver);
int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *version);
int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
const void *param);
int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name); int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name);
int btintel_set_event_mask(struct hci_dev *hdev, bool debug);
int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug); int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug);
int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver); int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver);
int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver);
struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read, struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
u16 opcode_write); u16 opcode_write);
int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param); int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param);
@ -207,11 +200,6 @@ int btintel_read_boot_params(struct hci_dev *hdev,
struct intel_boot_params *params); struct intel_boot_params *params);
int btintel_download_firmware(struct hci_dev *dev, struct intel_version *ver, int btintel_download_firmware(struct hci_dev *dev, struct intel_version *ver,
const struct firmware *fw, u32 *boot_param); const struct firmware *fw, u32 *boot_param);
void btintel_reset_to_bootloader(struct hci_dev *hdev);
int btintel_read_debug_features(struct hci_dev *hdev,
struct intel_debug_features *features);
int btintel_set_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features);
int btintel_configure_setup(struct hci_dev *hdev); int btintel_configure_setup(struct hci_dev *hdev);
void btintel_bootup(struct hci_dev *hdev, const void *ptr, unsigned int len); void btintel_bootup(struct hci_dev *hdev, const void *ptr, unsigned int len);
void btintel_secure_send_result(struct hci_dev *hdev, void btintel_secure_send_result(struct hci_dev *hdev,
@ -243,39 +231,18 @@ static inline int btintel_set_diag(struct hci_dev *hdev, bool enable)
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
{
}
static inline int btintel_version_info(struct hci_dev *hdev, static inline int btintel_version_info(struct hci_dev *hdev,
struct intel_version *ver) struct intel_version *ver)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static inline int btintel_version_info_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version)
{
return -EOPNOTSUPP;
}
static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type,
u32 plen, const void *param)
{
return -EOPNOTSUPP;
}
static inline int btintel_load_ddc_config(struct hci_dev *hdev, static inline int btintel_load_ddc_config(struct hci_dev *hdev,
const char *ddc_name) const char *ddc_name)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
{
return -EOPNOTSUPP;
}
static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug) static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
@ -287,12 +254,6 @@ static inline int btintel_read_version(struct hci_dev *hdev,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static inline int btintel_read_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver)
{
return -EOPNOTSUPP;
}
static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev, static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev,
u16 opcode_read, u16 opcode_read,
u16 opcode_write) u16 opcode_write)
@ -319,22 +280,6 @@ static inline int btintel_download_firmware(struct hci_dev *dev,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)
{
}
static inline int btintel_read_debug_features(struct hci_dev *hdev,
struct intel_debug_features *features)
{
return -EOPNOTSUPP;
}
static inline int btintel_set_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features)
{
return -EOPNOTSUPP;
}
static inline int btintel_configure_setup(struct hci_dev *hdev) static inline int btintel_configure_setup(struct hci_dev *hdev)
{ {
return -ENODEV; return -ENODEV;