summaryrefslogtreecommitdiff
path: root/drivers/net/fealnx.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-27 13:12:38 (GMT)
committerJeff Garzik <jeff@garzik.org>2006-07-05 17:40:50 (GMT)
commit46009c8bcd5d7c9fcbfc17d0455a471bea5be4d4 (patch)
treec9ab3cd5bf6ed74bf91a9644b566fc4ea7ff710e /drivers/net/fealnx.c
parent8ab6f3f706f5cb91bc0793afc95c8809837ece05 (diff)
downloadlinux-46009c8bcd5d7c9fcbfc17d0455a471bea5be4d4.tar.xz
[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>
Diffstat (limited to 'drivers/net/fealnx.c')
-rw-r--r--drivers/net/fealnx.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index 0e6a495..aaf13665 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -124,7 +124,9 @@ MODULE_PARM_DESC(multicast_filter_limit, "fealnx maximum number of filtered mult
MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex");
MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)");
-#define MIN_REGION_SIZE 136
+enum {
+ MIN_REGION_SIZE = 136,
+};
/* A chip capabilities table, matching the entries in pci_tbl[] above. */
enum chip_capability_flags {
@@ -149,7 +151,7 @@ struct chip_info {
int flags;
};
-static const struct chip_info skel_netdrv_tbl[] = {
+static const struct chip_info skel_netdrv_tbl[] __devinitdata = {
{ "100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
{ "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR },
{ "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
@@ -503,13 +505,14 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
len = pci_resource_len(pdev, bar);
if (len < MIN_REGION_SIZE) {
- printk(KERN_ERR "%s: region size %ld too small, aborting\n",
- boardname, len);
+ dev_printk(KERN_ERR, &pdev->dev,
+ "region size %ld too small, aborting\n", len);
return -ENODEV;
}
i = pci_request_regions(pdev, boardname);
- if (i) return i;
+ if (i)
+ return i;
irq = pdev->irq;