Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16267
b: refs/heads/master
c: 3cf89b1
h: refs/heads/master
i:
  16265: e4c14ae
  16263: 693891b
v: v3
  • Loading branch information
Alexey Dobriyan authored and Dominik Brodowski committed Jan 5, 2006
1 parent e1bc4df commit 8b4f6ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8084b372adac9c24ff7abdd939b2e8816e7b88a3
refs/heads/master: 3cf89b185971bf186cec657911f08354e7701635
30 changes: 15 additions & 15 deletions trunk/drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int follow_link(struct pcmcia_socket *s, tuple_t *tuple)
/* Get indirect link from the MFC tuple */
read_cis_cache(s, LINK_SPACE(tuple->Flags),
tuple->LinkOffset, 5, link);
ofs = le32_to_cpu(*(u_int *)(link+1));
ofs = le32_to_cpu(*(__le32 *)(link+1));
SPACE(tuple->Flags) = (link[0] == CISTPL_MFC_ATTR);
/* Move to the next indirect link */
tuple->LinkOffset += 5;
Expand Down Expand Up @@ -671,8 +671,8 @@ static int parse_checksum(tuple_t *tuple, cistpl_checksum_t *csum)
if (tuple->TupleDataLen < 5)
return CS_BAD_TUPLE;
p = (u_char *)tuple->TupleData;
csum->addr = tuple->CISOffset+(short)le16_to_cpu(*(u_short *)p)-2;
csum->len = le16_to_cpu(*(u_short *)(p + 2));
csum->addr = tuple->CISOffset+(short)le16_to_cpu(*(__le16 *)p)-2;
csum->len = le16_to_cpu(*(__le16 *)(p + 2));
csum->sum = *(p+4);
return CS_SUCCESS;
}
Expand All @@ -683,7 +683,7 @@ static int parse_longlink(tuple_t *tuple, cistpl_longlink_t *link)
{
if (tuple->TupleDataLen < 4)
return CS_BAD_TUPLE;
link->addr = le32_to_cpu(*(u_int *)tuple->TupleData);
link->addr = le32_to_cpu(*(__le32 *)tuple->TupleData);
return CS_SUCCESS;
}

Expand All @@ -702,7 +702,7 @@ static int parse_longlink_mfc(tuple_t *tuple,
return CS_BAD_TUPLE;
for (i = 0; i < link->nfn; i++) {
link->fn[i].space = *p; p++;
link->fn[i].addr = le32_to_cpu(*(u_int *)p); p += 4;
link->fn[i].addr = le32_to_cpu(*(__le32 *)p); p += 4;
}
return CS_SUCCESS;
}
Expand Down Expand Up @@ -789,10 +789,10 @@ static int parse_jedec(tuple_t *tuple, cistpl_jedec_t *jedec)

static int parse_manfid(tuple_t *tuple, cistpl_manfid_t *m)
{
u_short *p;
__le16 *p;
if (tuple->TupleDataLen < 4)
return CS_BAD_TUPLE;
p = (u_short *)tuple->TupleData;
p = (__le16 *)tuple->TupleData;
m->manf = le16_to_cpu(p[0]);
m->card = le16_to_cpu(p[1]);
return CS_SUCCESS;
Expand Down Expand Up @@ -1093,17 +1093,17 @@ static int parse_cftable_entry(tuple_t *tuple,
break;
case 0x20:
entry->mem.nwin = 1;
entry->mem.win[0].len = le16_to_cpu(*(u_short *)p) << 8;
entry->mem.win[0].len = le16_to_cpu(*(__le16 *)p) << 8;
entry->mem.win[0].card_addr = 0;
entry->mem.win[0].host_addr = 0;
p += 2;
if (p > q) return CS_BAD_TUPLE;
break;
case 0x40:
entry->mem.nwin = 1;
entry->mem.win[0].len = le16_to_cpu(*(u_short *)p) << 8;
entry->mem.win[0].len = le16_to_cpu(*(__le16 *)p) << 8;
entry->mem.win[0].card_addr =
le16_to_cpu(*(u_short *)(p+2)) << 8;
le16_to_cpu(*(__le16 *)(p+2)) << 8;
entry->mem.win[0].host_addr = 0;
p += 4;
if (p > q) return CS_BAD_TUPLE;
Expand Down Expand Up @@ -1140,7 +1140,7 @@ static int parse_bar(tuple_t *tuple, cistpl_bar_t *bar)
p = (u_char *)tuple->TupleData;
bar->attr = *p;
p += 2;
bar->size = le32_to_cpu(*(u_int *)p);
bar->size = le32_to_cpu(*(__le32 *)p);
return CS_SUCCESS;
}

Expand All @@ -1153,7 +1153,7 @@ static int parse_config_cb(tuple_t *tuple, cistpl_config_t *config)
return CS_BAD_TUPLE;
config->last_idx = *(++p);
p++;
config->base = le32_to_cpu(*(u_int *)p);
config->base = le32_to_cpu(*(__le32 *)p);
config->subtuples = tuple->TupleDataLen - 6;
return CS_SUCCESS;
}
Expand Down Expand Up @@ -1269,7 +1269,7 @@ static int parse_vers_2(tuple_t *tuple, cistpl_vers_2_t *v2)

v2->vers = p[0];
v2->comply = p[1];
v2->dindex = le16_to_cpu(*(u_short *)(p+2));
v2->dindex = le16_to_cpu(*(__le16 *)(p+2));
v2->vspec8 = p[6];
v2->vspec9 = p[7];
v2->nhdr = p[8];
Expand Down Expand Up @@ -1310,8 +1310,8 @@ static int parse_format(tuple_t *tuple, cistpl_format_t *fmt)

fmt->type = p[0];
fmt->edc = p[1];
fmt->offset = le32_to_cpu(*(u_int *)(p+2));
fmt->length = le32_to_cpu(*(u_int *)(p+6));
fmt->offset = le32_to_cpu(*(__le32 *)(p+2));
fmt->length = le32_to_cpu(*(__le32 *)(p+6));

return CS_SUCCESS;
}
Expand Down

0 comments on commit 8b4f6ba

Please sign in to comment.