Peter Denison writes:
> Can we all agree that the following is at least _acceptable_?
>
> e.g.
> struct rx_desc {
> s32 base;
> s16 buf_len;
> s16 msg_len;
> } __attribute__((packed));
> ...
> struct rx_desc * rx_ring = ioremap(0xC0000, size_of_ring);
> ...
> writel(value, &rx_ring[i].base);
> writew(value, &rx_ring[i].buf_len);
> ...
> iounmap(rx_ring);
That is questionable, but acceptable, since you are referring to a *defined
structure* which has types. This structure is defined by the data sheet.
Device registers are described as offsets from a base, and should never have
an apparant structure.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:23 EST