[net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

David Miller davem at davemloft.net
Fri Jan 22 13:03:11 EST 2010


From: Wolfgang Grandegger <wg at grandegger.com>
Date: Thu, 21 Jan 2010 16:25:38 +0100

> Do you see a more clever solution to this problem?

See how we handle this in the ESP scsi driver.  We have a set of
defines for the register offsets, and a set of methods a chip driver
implements for register accesses.

If the offsets differ, the register access method can translate the
generic register offsets into whatever layout their implementation
actually uses.

> Nevertheless, the code could be improved by using "offsetof", I
> think.

At a minimum :-)


More information about the Linuxppc-dev mailing list