提交 b0551fb7 编写于 作者: A Alwin Beukers 提交者: John W. Linville

brcm80211: moved function brcmu_chipname

Moved the brcmu_chipname function into the only file using it.
The function name was adjusted accordingly.
Reported-by: NJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: NRoland Vossen <rvossen@broadcom.com>
Reviewed-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 ef6ac17a
...@@ -3991,6 +3991,15 @@ static const struct sdiod_drive_str sdiod_drive_strength_tab3[] = { ...@@ -3991,6 +3991,15 @@ static const struct sdiod_drive_str sdiod_drive_strength_tab3[] = {
#define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu)) #define SDIOD_DRVSTR_KEY(chip, pmu) (((chip) << 16) | (pmu))
static char *brcmf_chipname(uint chipid, char *buf, uint len)
{
const char *fmt;
fmt = ((chipid > 0xa000) || (chipid < 0x4000)) ? "%d" : "%x";
snprintf(buf, len, fmt, chipid);
return buf;
}
static void brcmf_sdbrcm_sdiod_drive_strength_init(struct brcmf_bus *bus, static void brcmf_sdbrcm_sdiod_drive_strength_init(struct brcmf_bus *bus,
u32 drivestrength) { u32 drivestrength) {
struct sdiod_drive_str *str_tab = NULL; struct sdiod_drive_str *str_tab = NULL;
...@@ -4020,7 +4029,7 @@ static void brcmf_sdbrcm_sdiod_drive_strength_init(struct brcmf_bus *bus, ...@@ -4020,7 +4029,7 @@ static void brcmf_sdbrcm_sdiod_drive_strength_init(struct brcmf_bus *bus,
break; break;
default: default:
brcmf_dbg(ERROR, "No SDIO Drive strength init done for chip %s rev %d pmurev %d\n", brcmf_dbg(ERROR, "No SDIO Drive strength init done for chip %s rev %d pmurev %d\n",
brcmu_chipname(bus->ci->chip, chn, 8), brcmf_chipname(bus->ci->chip, chn, 8),
bus->ci->chiprev, bus->ci->pmurev); bus->ci->chiprev, bus->ci->pmurev);
break; break;
} }
......
...@@ -469,16 +469,6 @@ int brcmu_format_hex(char *str, const void *bytes, int len) ...@@ -469,16 +469,6 @@ int brcmu_format_hex(char *str, const void *bytes, int len)
EXPORT_SYMBOL(brcmu_format_hex); EXPORT_SYMBOL(brcmu_format_hex);
#endif /* defined(BCMDBG) */ #endif /* defined(BCMDBG) */
char *brcmu_chipname(uint chipid, char *buf, uint len)
{
const char *fmt;
fmt = ((chipid > 0xa000) || (chipid < 0x4000)) ? "%d" : "%x";
snprintf(buf, len, fmt, chipid);
return buf;
}
EXPORT_SYMBOL(brcmu_chipname);
uint brcmu_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen) uint brcmu_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
{ {
uint len; uint len;
......
...@@ -207,8 +207,6 @@ extern int brcmu_format_flags(const struct brcmu_bit_desc *bd, u32 flags, ...@@ -207,8 +207,6 @@ extern int brcmu_format_flags(const struct brcmu_bit_desc *bd, u32 flags,
extern int brcmu_format_hex(char *str, const void *bytes, int len); extern int brcmu_format_hex(char *str, const void *bytes, int len);
#endif #endif
extern char *brcmu_chipname(uint chipid, char *buf, uint len);
extern struct brcmu_tlv *brcmu_parse_tlvs(void *buf, int buflen, extern struct brcmu_tlv *brcmu_parse_tlvs(void *buf, int buflen,
uint key); uint key);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册