[netdevice] Make all net_driver methods optional

Most network upper-layer drivers do not implement all three methods
(probe, notify, and remove).  Save code by making all methods
optional.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-10-31 14:09:43 +00:00
parent 5e1fa5cd40
commit 5c11ff6304
6 changed files with 13 additions and 72 deletions

View File

@@ -943,16 +943,6 @@ static int ipv6_probe ( struct net_device *netdev ) {
return 0;
}
/**
* Handle IPv6 network device or link state change
*
* @v netdev Network device
*/
static void ipv6_notify ( struct net_device *netdev __unused ) {
/* Nothing to do */
}
/**
* Destroy IPv6 network device
*
@@ -973,7 +963,6 @@ static void ipv6_remove ( struct net_device *netdev ) {
struct net_driver ipv6_driver __net_driver = {
.name = "IPv6",
.probe = ipv6_probe,
.notify = ipv6_notify,
.remove = ipv6_remove,
};