Messages in this thread | | | From | Russell King <> | Subject | Re: [PATCH] isa_{read,write}{w,l} fixed | Date | Sat, 12 Feb 2000 20:51:34 +0000 (GMT) |
| |
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/
| |