aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/yellowfin.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-27 08:54:34 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-05 13:40:49 -0400
commitc3d8e682b7d10f57d13c86ecbb15806781d6e953 (patch)
treeb3c20aaf5679ad22a91d14de16615f0d31e3e19d /drivers/net/yellowfin.c
parent03a8c6611aa18f919f8700b18f925e9008b616a8 (diff)
[netdrvr] Remove Becker-template 'io_size' member, when invariant
Becker-derived drivers often have the 'io_size' member in their chip info struct, indicating the minimum required size of the I/O resource (usually a PCI BAR). For many situations, this number is either constant or irrelevant (due to pci_iomap convenience behavior). This change removes the io_size invariant member, and replaces it with a compile-time constant. Drivers updated: fealnx, gt96100eth, winbond-840, yellowfin Additionally, - gt96100eth: unused 'drv_flags' removed from gt96100eth - winbond-840: unused struct match_info removed - winbond-840: mark pci_id_tbl[] const, __devinitdata Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/yellowfin.c')
-rw-r--r--drivers/net/yellowfin.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 207340fe8df9..8459a18254a4 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -215,8 +215,11 @@ enum capability_flags {
215 HasMACAddrBug=32, /* Only on early revs. */ 215 HasMACAddrBug=32, /* Only on early revs. */
216 DontUseEeprom=64, /* Don't read the MAC from the EEPROm. */ 216 DontUseEeprom=64, /* Don't read the MAC from the EEPROm. */
217}; 217};
218
218/* The PCI I/O space extent. */ 219/* The PCI I/O space extent. */
219#define YELLOWFIN_SIZE 0x100 220enum {
221 YELLOWFIN_SIZE = 0x100,
222};
220 223
221struct pci_id_info { 224struct pci_id_info {
222 const char *name; 225 const char *name;
@@ -224,16 +227,14 @@ struct pci_id_info {
224 int pci, pci_mask, subsystem, subsystem_mask; 227 int pci, pci_mask, subsystem, subsystem_mask;
225 int revision, revision_mask; /* Only 8 bits. */ 228 int revision, revision_mask; /* Only 8 bits. */
226 } id; 229 } id;
227 int io_size; /* Needed for I/O region check or ioremap(). */
228 int drv_flags; /* Driver use, intended as capability flags. */ 230 int drv_flags; /* Driver use, intended as capability flags. */
229}; 231};
230 232
231static const struct pci_id_info pci_id_tbl[] = { 233static const struct pci_id_info pci_id_tbl[] = {
232 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, 234 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff},
233 YELLOWFIN_SIZE,
234 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom}, 235 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom},
235 {"Symbios SYM83C885", { 0x07011000, 0xffffffff}, 236 {"Symbios SYM83C885", { 0x07011000, 0xffffffff},
236 YELLOWFIN_SIZE, HasMII | DontUseEeprom }, 237 HasMII | DontUseEeprom },
237 { } 238 { }
238}; 239};
239 240