Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[netdrvr] minor cleanups in Becker-derived drivers

- fealnx: convert #define to enum
- fealnx, sundance: mark chip info table __devinitdata
- fealnx: use dev_printk() during probe
- fealnx: formatting cleanups
- starfire: remove obsolete comment
- sundance, via-rhine: add some whitespace where useful, in tables
- sundance: prefer "{ }" table terminator
- via-rhine: mark PCI probe table const

Signed-off-by: Jeff Garzik <jeff@garzik.org>

+24 -23
+8 -5
drivers/net/fealnx.c
··· 124 124 MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex"); 125 125 MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)"); 126 126 127 - #define MIN_REGION_SIZE 136 127 + enum { 128 + MIN_REGION_SIZE = 136, 129 + }; 128 130 129 131 /* A chip capabilities table, matching the entries in pci_tbl[] above. */ 130 132 enum chip_capability_flags { ··· 151 149 int flags; 152 150 }; 153 151 154 - static const struct chip_info skel_netdrv_tbl[] = { 152 + static const struct chip_info skel_netdrv_tbl[] __devinitdata = { 155 153 { "100/10M Ethernet PCI Adapter", HAS_MII_XCVR }, 156 154 { "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR }, 157 155 { "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR }, ··· 505 503 506 504 len = pci_resource_len(pdev, bar); 507 505 if (len < MIN_REGION_SIZE) { 508 - printk(KERN_ERR "%s: region size %ld too small, aborting\n", 509 - boardname, len); 506 + dev_printk(KERN_ERR, &pdev->dev, 507 + "region size %ld too small, aborting\n", len); 510 508 return -ENODEV; 511 509 } 512 510 513 511 i = pci_request_regions(pdev, boardname); 514 - if (i) return i; 512 + if (i) 513 + return i; 515 514 516 515 irq = pdev->irq; 517 516
-1
drivers/net/starfire.c
··· 730 730 goto err_out_free_netdev; 731 731 } 732 732 733 - /* ioremap is borken in Linux-2.2.x/sparc64 */ 734 733 base = ioremap(ioaddr, io_size); 735 734 if (!base) { 736 735 printk(KERN_ERR DRV_NAME " %d: cannot remap %#x @ %#lx, aborting\n",
+11 -11
drivers/net/sundance.c
··· 204 204 #define USE_IO_OPS 1 205 205 #endif 206 206 207 - static struct pci_device_id sundance_pci_tbl[] = { 208 - {0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0}, 209 - {0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1}, 210 - {0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2}, 211 - {0x1186, 0x1002, 0x1186, 0x1040, 0, 0, 3}, 212 - {0x1186, 0x1002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 213 - {0x13F0, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, 214 - {0x13F0, 0x0200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, 215 - {0,} 207 + static const struct pci_device_id sundance_pci_tbl[] = { 208 + { 0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0 }, 209 + { 0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1 }, 210 + { 0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2 }, 211 + { 0x1186, 0x1002, 0x1186, 0x1040, 0, 0, 3 }, 212 + { 0x1186, 0x1002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, 213 + { 0x13F0, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }, 214 + { 0x13F0, 0x0200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 }, 215 + { } 216 216 }; 217 217 MODULE_DEVICE_TABLE(pci, sundance_pci_tbl); 218 218 ··· 223 223 struct pci_id_info { 224 224 const char *name; 225 225 }; 226 - static const struct pci_id_info pci_id_tbl[] = { 226 + static const struct pci_id_info pci_id_tbl[] __devinitdata = { 227 227 {"D-Link DFE-550TX FAST Ethernet Adapter"}, 228 228 {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"}, 229 229 {"D-Link DFE-580TX 4 port Server Adapter"}, ··· 231 231 {"D-Link DL10050-based FAST Ethernet Adapter"}, 232 232 {"Sundance Technology Alta"}, 233 233 {"IC Plus Corporation IP100A FAST Ethernet Adapter"}, 234 - {NULL,}, /* 0 terminated list. */ 234 + { } /* terminate list. */ 235 235 }; 236 236 237 237 /* This driver was written to use PCI memory space, however x86-oriented
+5 -6
drivers/net/via-rhine.c
··· 252 252 /* Beware of PCI posted writes */ 253 253 #define IOSYNC do { ioread8(ioaddr + StationAddr); } while (0) 254 254 255 - static struct pci_device_id rhine_pci_tbl[] = 256 - { 257 - {0x1106, 0x3043, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT86C100A */ 258 - {0x1106, 0x3065, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT6102 */ 259 - {0x1106, 0x3106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* 6105{,L,LOM} */ 260 - {0x1106, 0x3053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT6105M */ 255 + static const struct pci_device_id rhine_pci_tbl[] = { 256 + { 0x1106, 0x3043, PCI_ANY_ID, PCI_ANY_ID, }, /* VT86C100A */ 257 + { 0x1106, 0x3065, PCI_ANY_ID, PCI_ANY_ID, }, /* VT6102 */ 258 + { 0x1106, 0x3106, PCI_ANY_ID, PCI_ANY_ID, }, /* 6105{,L,LOM} */ 259 + { 0x1106, 0x3053, PCI_ANY_ID, PCI_ANY_ID, }, /* VT6105M */ 261 260 { } /* terminate list */ 262 261 }; 263 262 MODULE_DEVICE_TABLE(pci, rhine_pci_tbl);