Kill off hotplug.h and just make net devices normal reference-counted

structures.

DHCP still broken and #if 0'd out.
This commit is contained in:
Michael Brown
2007-06-27 14:48:31 +01:00
parent e381714c07
commit f77815f2b1
16 changed files with 112 additions and 256 deletions
+7 -9
View File
@@ -206,7 +206,7 @@ static void pnic_remove ( struct pci_device *pci ) {
unregister_netdev ( netdev );
pnic_command ( pnic, PNIC_CMD_RESET, NULL, 0, NULL, 0, NULL );
free_netdev ( netdev );
netdev_put ( netdev );
}
/**************************************************************************
@@ -220,20 +220,18 @@ static int pnic_probe ( struct pci_device *pci,
uint16_t status;
int rc;
/* Fix up PCI device */
adjust_pci_device ( pci );
/* Allocate net device */
netdev = alloc_etherdev ( sizeof ( *pnic ) );
if ( ! netdev ) {
rc = -ENOMEM;
goto err;
}
if ( ! netdev )
return -ENOMEM;
pnic = netdev->priv;
pci_set_drvdata ( pci, netdev );
netdev->dev = &pci->dev;
pnic->ioaddr = pci->ioaddr;
/* Fix up PCI device */
adjust_pci_device ( pci );
/* API version check */
status = pnic_command_quiet ( pnic, PNIC_CMD_API_VER, NULL, 0,
&api_version,
@@ -264,7 +262,7 @@ static int pnic_probe ( struct pci_device *pci,
err:
/* Free net device */
free_netdev ( netdev );
netdev_put ( netdev );
return rc;
}