summaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/util/bcmsrom.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-07 17:04:47 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-07 17:04:47 -0700
commit7d4df48eba4cea654ee6fe6e1a51a0600807ed7b (patch)
tree7c4e3cbb7d576ac3a0b273b5908bbed460eceb0a /drivers/staging/brcm80211/util/bcmsrom.c
parent4128dd9afb986321edf0baa8a3aaa3c7c5aa3730 (diff)
downloadop-kernel-dev-7d4df48eba4cea654ee6fe6e1a51a0600807ed7b.zip
op-kernel-dev-7d4df48eba4cea654ee6fe6e1a51a0600807ed7b.tar.gz
Staging: brcm80211: s/uint16/u16/
Use the kernel types, don't invent your own. Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Nohee Ko <noheek@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/util/bcmsrom.c')
-rw-r--r--drivers/staging/brcm80211/util/bcmsrom.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c
index 842b70a..73e48a6 100644
--- a/drivers/staging/brcm80211/util/bcmsrom.c
+++ b/drivers/staging/brcm80211/util/bcmsrom.c
@@ -70,7 +70,7 @@ extern uint _varsz;
static int initvars_srom_si(si_t *sih, osl_t *osh, void *curmap, char **vars,
uint *count);
-static void _initvars_srom_pci(u8 sromrev, uint16 *srom, uint off,
+static void _initvars_srom_pci(u8 sromrev, u16 *srom, uint off,
varbuf_t *b);
static int initvars_srom_pci(si_t *sih, void *curmap, char **vars,
uint *count);
@@ -78,15 +78,15 @@ static int initvars_flash_si(si_t *sih, char **vars, uint *count);
#ifdef BCMSDIO
static int initvars_cis_sdio(osl_t *osh, char **vars, uint *count);
static int sprom_cmd_sdio(osl_t *osh, u8 cmd);
-static int sprom_read_sdio(osl_t *osh, uint16 addr, uint16 *data);
+static int sprom_read_sdio(osl_t *osh, u16 addr, u16 *data);
#endif /* BCMSDIO */
-static int sprom_read_pci(osl_t *osh, si_t *sih, uint16 *sprom, uint wordoff,
- uint16 *buf, uint nwords, bool check_crc);
+static int sprom_read_pci(osl_t *osh, si_t *sih, u16 *sprom, uint wordoff,
+ u16 *buf, uint nwords, bool check_crc);
#if defined(BCMNVRAMR)
-static int otp_read_pci(osl_t *osh, si_t *sih, uint16 *buf, uint bufsz);
+static int otp_read_pci(osl_t *osh, si_t *sih, u16 *buf, uint bufsz);
#endif
-static uint16 srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, uint32 cmd,
- uint wordoff, uint16 data);
+static u16 srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, uint32 cmd,
+ uint wordoff, u16 data);
static int initvars_table(osl_t *osh, char *start, char *end, char **vars,
uint *count);
@@ -197,7 +197,7 @@ BCMATTACHFN(srom_var_init) (si_t *sih, uint bustype, void *curmap, osl_t *osh,
/* support only 16-bit word read from srom */
int
srom_read(si_t *sih, uint bustype, void *curmap, osl_t *osh,
- uint byteoff, uint nbytes, uint16 *buf, bool check_crc)
+ uint byteoff, uint nbytes, u16 *buf, bool check_crc)
{
uint off, nw;
#ifdef BCMSDIO
@@ -218,9 +218,9 @@ srom_read(si_t *sih, uint bustype, void *curmap, osl_t *osh,
return 1;
if (si_is_sprom_available(sih)) {
- uint16 *srom;
+ u16 *srom;
- srom = (uint16 *) SROM_OFFSET(sih);
+ srom = (u16 *) SROM_OFFSET(sih);
if (srom == NULL)
return 1;
@@ -240,7 +240,7 @@ srom_read(si_t *sih, uint bustype, void *curmap, osl_t *osh,
nw = nbytes / 2;
for (i = 0; i < nw; i++) {
if (sprom_read_sdio
- (osh, (uint16) (off + i), (uint16 *) (buf + i)))
+ (osh, (u16) (off + i), (u16 *) (buf + i)))
return 1;
}
#endif /* BCMSDIO */
@@ -1014,7 +1014,7 @@ BCMATTACHFN(srom_parsecis) (osl_t *osh, u8 *pcis[], uint ciscnt,
break;
case HNBU_FEM:{
- uint16 fem =
+ u16 fem =
(cis[i + 2] << 8) + cis[i +
1];
varbuf_append(&b,
@@ -1336,7 +1336,7 @@ BCMATTACHFN(srom_parsecis) (osl_t *osh, u8 *pcis[], uint ciscnt,
#if defined(BCMSDIO)
case HNBU_SROM3SWRGN:
if (tlen >= 73) {
- uint16 srom[35];
+ u16 srom[35];
u8 srev = cis[i + 1 + 70];
ASSERT(srev == 3);
/* make tuple value 16-bit aligned and parse it */
@@ -1412,9 +1412,9 @@ BCMATTACHFN(srom_parsecis) (osl_t *osh, u8 *pcis[], uint ciscnt,
/* In chips with chipcommon rev 32 and later, the srom is in chipcommon,
* not in the bus cores.
*/
-static uint16
+static u16
srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, uint32 cmd, uint wordoff,
- uint16 data)
+ u16 data)
{
chipcregs_t *cc = (chipcregs_t *) ccregs;
uint wait_cnt = 1000;
@@ -1437,7 +1437,7 @@ srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, uint32 cmd, uint wordoff,
return 0xffff;
}
if (cmd == SRC_OP_READ)
- return (uint16) R_REG(osh, &cc->sromdata);
+ return (u16) R_REG(osh, &cc->sromdata);
else
return 0xffff;
}
@@ -1447,8 +1447,8 @@ srom_cc_cmd(si_t *sih, osl_t *osh, void *ccregs, uint32 cmd, uint wordoff,
* Return 0 on success, nonzero on error.
*/
static int
-sprom_read_pci(osl_t *osh, si_t *sih, uint16 *sprom, uint wordoff,
- uint16 *buf, uint nwords, bool check_crc)
+sprom_read_pci(osl_t *osh, si_t *sih, u16 *sprom, uint wordoff,
+ u16 *buf, uint nwords, bool check_crc)
{
int err = 0;
uint i;
@@ -1507,7 +1507,7 @@ sprom_read_pci(osl_t *osh, si_t *sih, uint16 *sprom, uint wordoff,
}
#if defined(BCMNVRAMR)
-static int otp_read_pci(osl_t *osh, si_t *sih, uint16 *buf, uint bufsz)
+static int otp_read_pci(osl_t *osh, si_t *sih, u16 *buf, uint bufsz)
{
u8 *otp;
uint sz = OTP_SZ_MAX / 2; /* size in words */
@@ -1522,7 +1522,7 @@ static int otp_read_pci(osl_t *osh, si_t *sih, uint16 *buf, uint bufsz)
bzero(otp, OTP_SZ_MAX);
- err = otp_read_region(sih, OTP_HW_RGN, (uint16 *) otp, &sz);
+ err = otp_read_region(sih, OTP_HW_RGN, (u16 *) otp, &sz);
bcopy(otp, buf, bufsz);
@@ -1673,7 +1673,7 @@ BCMATTACHFN(initvars_flash_si) (si_t *sih, char **vars, uint *count)
* SROM3_SWRG_OFF (full SROM or software region).
*/
-static uint mask_shift(uint16 mask)
+static uint mask_shift(u16 mask)
{
uint i;
for (i = 0; i < (sizeof(mask) << 3); i++) {
@@ -1684,7 +1684,7 @@ static uint mask_shift(uint16 mask)
return 0;
}
-static uint mask_width(uint16 mask)
+static uint mask_width(u16 mask)
{
int i;
for (i = (sizeof(mask) << 3) - 1; i >= 0; i--) {
@@ -1696,7 +1696,7 @@ static uint mask_width(uint16 mask)
}
#if defined(BCMDBG)
-static bool mask_valid(uint16 mask)
+static bool mask_valid(u16 mask)
{
uint shift = mask_shift(mask);
uint width = mask_width(mask);
@@ -1705,9 +1705,9 @@ static bool mask_valid(uint16 mask)
#endif /* BCMDBG */
static void
-BCMATTACHFN(_initvars_srom_pci) (u8 sromrev, uint16 *srom, uint off,
+BCMATTACHFN(_initvars_srom_pci) (u8 sromrev, u16 *srom, uint off,
varbuf_t *b) {
- uint16 w;
+ u16 w;
uint32 val;
const sromvar_t *srv;
uint width;
@@ -1856,7 +1856,7 @@ BCMATTACHFN(_initvars_srom_pci) (u8 sromrev, uint16 *srom, uint off,
static int
BCMATTACHFN(initvars_srom_pci) (si_t *sih, void *curmap, char **vars,
uint *count) {
- uint16 *srom, *sromwindow;
+ u16 *srom, *sromwindow;
u8 sromrev = 0;
uint32 sr;
varbuf_t b;
@@ -1876,7 +1876,7 @@ BCMATTACHFN(initvars_srom_pci) (si_t *sih, void *curmap, char **vars,
if (!srom)
return -2;
- sromwindow = (uint16 *) SROM_OFFSET(sih);
+ sromwindow = (u16 *) SROM_OFFSET(sih);
if (si_is_sprom_available(sih)) {
err =
sprom_read_pci(osh, sih, sromwindow, 0, srom, SROM_WORDS,
@@ -2059,7 +2059,7 @@ static int BCMATTACHFN(sprom_cmd_sdio) (osl_t *osh, u8 cmd)
}
/* read a word from the SDIO srom */
-static int sprom_read_sdio(osl_t *osh, uint16 addr, uint16 *data)
+static int sprom_read_sdio(osl_t *osh, u16 addr, u16 *data)
{
u8 addr_l, addr_h, data_l, data_h;
OpenPOWER on IntegriCloud