mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 03:55:46 +03:00
[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:
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user