diff options
author | Arend van Spriel <arend@broadcom.com> | 2015-01-25 14:31:38 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-29 02:59:09 -0500 |
commit | 31fc436f184dc4219d837d4ffc97ad7c2ca0954d (patch) | |
tree | 4e4660c79d2a1765e6c1077f912cc7a01823c171 /drivers/net/wireless/brcm80211/brcmutil | |
parent | 86fec35e17c15f466ebf3f942b60d35d47929444 (diff) |
brcmutil: use define for boardrev string function
Introducing a define that the caller of brcmu_boardrev_str() can
use to allocate enough room for buffer passed to the function.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmutil')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmutil/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c index 906e89ddf319..34937d8e1395 100644 --- a/drivers/net/wireless/brcm80211/brcmutil/utils.c +++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c | |||
@@ -267,10 +267,11 @@ char *brcmu_boardrev_str(u32 brev, char *buf) | |||
267 | char c; | 267 | char c; |
268 | 268 | ||
269 | if (brev < 0x100) { | 269 | if (brev < 0x100) { |
270 | snprintf(buf, 8, "%d.%d", (brev & 0xf0) >> 4, brev & 0xf); | 270 | snprintf(buf, BRCMU_BOARDREV_LEN, "%d.%d", |
271 | (brev & 0xf0) >> 4, brev & 0xf); | ||
271 | } else { | 272 | } else { |
272 | c = (brev & 0xf000) == 0x1000 ? 'P' : 'A'; | 273 | c = (brev & 0xf000) == 0x1000 ? 'P' : 'A'; |
273 | snprintf(buf, 8, "%c%03x", c, brev & 0xfff); | 274 | snprintf(buf, BRCMU_BOARDREV_LEN, "%c%03x", c, brev & 0xfff); |
274 | } | 275 | } |
275 | return buf; | 276 | return buf; |
276 | } | 277 | } |