diff options
author | Henrik Kretzschmar <henne@nachtwindheim.de> | 2006-07-24 08:42:01 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-29 01:31:33 -0400 |
commit | e1c3e5014040869abd6ef2cdf987e7c74cb40ada (patch) | |
tree | cd8cd078e6b40a64866e5e152b0e5d06e7126700 /drivers | |
parent | a8bed49ecfb47a40cc401f5ec7c9a8a38098e728 (diff) |
[PATCH] initialisation cleanup for ULI526x-net-driver
removes the unneeded local variable rc
replace pci_module_init() with pci_register_driver()
two coding style issues on switch
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tulip/uli526x.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index fd64b2b3e99c..c4c720e2d4c3 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -1702,7 +1702,6 @@ MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8 | |||
1702 | 1702 | ||
1703 | static int __init uli526x_init_module(void) | 1703 | static int __init uli526x_init_module(void) |
1704 | { | 1704 | { |
1705 | int rc; | ||
1706 | 1705 | ||
1707 | printk(version); | 1706 | printk(version); |
1708 | printed_version = 1; | 1707 | printed_version = 1; |
@@ -1714,22 +1713,19 @@ static int __init uli526x_init_module(void) | |||
1714 | if (cr6set) | 1713 | if (cr6set) |
1715 | uli526x_cr6_user_set = cr6set; | 1714 | uli526x_cr6_user_set = cr6set; |
1716 | 1715 | ||
1717 | switch(mode) { | 1716 | switch (mode) { |
1718 | case ULI526X_10MHF: | 1717 | case ULI526X_10MHF: |
1719 | case ULI526X_100MHF: | 1718 | case ULI526X_100MHF: |
1720 | case ULI526X_10MFD: | 1719 | case ULI526X_10MFD: |
1721 | case ULI526X_100MFD: | 1720 | case ULI526X_100MFD: |
1722 | uli526x_media_mode = mode; | 1721 | uli526x_media_mode = mode; |
1723 | break; | 1722 | break; |
1724 | default:uli526x_media_mode = ULI526X_AUTO; | 1723 | default: |
1724 | uli526x_media_mode = ULI526X_AUTO; | ||
1725 | break; | 1725 | break; |
1726 | } | 1726 | } |
1727 | 1727 | ||
1728 | rc = pci_module_init(&uli526x_driver); | 1728 | return pci_register_driver(&uli526x_driver); |
1729 | if (rc < 0) | ||
1730 | return rc; | ||
1731 | |||
1732 | return 0; | ||
1733 | } | 1729 | } |
1734 | 1730 | ||
1735 | 1731 | ||