Commit e1c3e501 authored by Henrik Kretzschmar's avatar Henrik Kretzschmar Committed by Jeff Garzik

[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: default avatarHenrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent a8bed49e
...@@ -1702,7 +1702,6 @@ MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8 ...@@ -1702,7 +1702,6 @@ MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8
static int __init uli526x_init_module(void) static int __init uli526x_init_module(void)
{ {
int rc;
printk(version); printk(version);
printed_version = 1; printed_version = 1;
...@@ -1714,22 +1713,19 @@ static int __init uli526x_init_module(void) ...@@ -1714,22 +1713,19 @@ static int __init uli526x_init_module(void)
if (cr6set) if (cr6set)
uli526x_cr6_user_set = cr6set; uli526x_cr6_user_set = cr6set;
switch(mode) { switch (mode) {
case ULI526X_10MHF: case ULI526X_10MHF:
case ULI526X_100MHF: case ULI526X_100MHF:
case ULI526X_10MFD: case ULI526X_10MFD:
case ULI526X_100MFD: case ULI526X_100MFD:
uli526x_media_mode = mode; uli526x_media_mode = mode;
break; break;
default:uli526x_media_mode = ULI526X_AUTO; default:
uli526x_media_mode = ULI526X_AUTO;
break; break;
} }
rc = pci_module_init(&uli526x_driver); return pci_register_driver(&uli526x_driver);
if (rc < 0)
return rc;
return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment