Skip to content

Commit

Permalink
staging: rtlwifi: remove unused functions
Browse files Browse the repository at this point in the history
Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the
driver. Both functions call rtl_addr_delay(), this function is unused
outside of these call sites.The driver (and kernel) code base is cleaner
if unused functions are removed.

Remove unused functions.

Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
tcharding authored and gregkh committed Sep 17, 2017
1 parent 85d309d commit f216f6c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
37 changes: 0 additions & 37 deletions drivers/staging/rtlwifi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,43 +49,6 @@ u8 channel5g_80m[CHANNEL_MAX_NUMBER_5G_80M] = {
42, 58, 106, 122, 138, 155, 171
};

void rtl_addr_delay(u32 addr)
{
if (addr == 0xfe)
mdelay(50);
else if (addr == 0xfd)
msleep(5);
else if (addr == 0xfc)
msleep(1);
else if (addr == 0xfb)
usleep_range(50, 100);
else if (addr == 0xfa)
usleep_range(5, 10);
else if (addr == 0xf9)
usleep_range(1, 2);
}

void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
u32 mask, u32 data)
{
if (addr >= 0xf9 && addr <= 0xfe) {
rtl_addr_delay(addr);
} else {
rtl_set_rfreg(hw, rfpath, addr, mask, data);
udelay(1);
}
}

void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data)
{
if (addr >= 0xf9 && addr <= 0xfe) {
rtl_addr_delay(addr);
} else {
rtl_set_bbreg(hw, addr, MASKDWORD, data);
udelay(1);
}
}

static void rtl_fw_do_work(const struct firmware *firmware, void *context,
bool is_wow)
{
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/rtlwifi/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ enum dm_dig_connect_e {
extern const struct ieee80211_ops rtl_ops;
void rtl_fw_cb(const struct firmware *firmware, void *context);
void rtl_wowlan_fw_cb(const struct firmware *firmware, void *context);
void rtl_addr_delay(u32 addr);
void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
u32 mask, u32 data);
void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data);
bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb);
bool rtl_btc_status_false(void);
void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval);
Expand Down

0 comments on commit f216f6c

Please sign in to comment.