diff options
| author | Michael Brown | 2013-10-31 15:09:43 +0100 |
|---|---|---|
| committer | Michael Brown | 2013-11-01 03:26:44 +0100 |
| commit | 5c11ff630440b5ef6d1bfadab06e265f61312369 (patch) | |
| tree | f0014ce8335637cd92f997c4bb301f9da723edb6 /src/arch | |
| parent | [parseopt] Add parse_timeout() (diff) | |
| download | ipxe-5c11ff630440b5ef6d1bfadab06e265f61312369.tar.gz ipxe-5c11ff630440b5ef6d1bfadab06e265f61312369.tar.xz ipxe-5c11ff630440b5ef6d1bfadab06e265f61312369.zip | |
[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>
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/i386/core/cachedhcp.c | 22 | ||||
| -rw-r--r-- | src/arch/i386/interface/vmware/guestinfo.c | 10 |
2 files changed, 0 insertions, 32 deletions
diff --git a/src/arch/i386/core/cachedhcp.c b/src/arch/i386/core/cachedhcp.c index 9ebde3e8c..b967e9b98 100644 --- a/src/arch/i386/core/cachedhcp.c +++ b/src/arch/i386/core/cachedhcp.c @@ -159,30 +159,8 @@ static int cachedhcp_probe ( struct net_device *netdev ) { return 0; } -/** - * Handle network device link state change - * - * @v netdev Network device - */ -static void cachedhcp_notify ( struct net_device *netdev __unused ) { - - /* Nothing to do */ -} - -/** - * Handle network device removal - * - * @v netdev Network device - */ -static void cachedhcp_remove ( struct net_device *netdev __unused ) { - - /* Nothing to do */ -} - /** Cached DHCP packet network device driver */ struct net_driver cachedhcp_driver __net_driver = { .name = "cachedhcp", .probe = cachedhcp_probe, - .notify = cachedhcp_notify, - .remove = cachedhcp_remove, }; diff --git a/src/arch/i386/interface/vmware/guestinfo.c b/src/arch/i386/interface/vmware/guestinfo.c index 7fa41b86b..aa10fc015 100644 --- a/src/arch/i386/interface/vmware/guestinfo.c +++ b/src/arch/i386/interface/vmware/guestinfo.c @@ -244,15 +244,6 @@ static int guestinfo_net_probe ( struct net_device *netdev ) { } /** - * Handle network device or link state change - * - * @v netdev Network device - */ -static void guestinfo_net_notify ( struct net_device *netdev __unused ) { - /* Nothing to do */ -} - -/** * Remove per-netdevice GuestInfo settings * * @v netdev Network device @@ -276,6 +267,5 @@ static void guestinfo_net_remove ( struct net_device *netdev ) { struct net_driver guestinfo_net_driver __net_driver = { .name = "GuestInfo", .probe = guestinfo_net_probe, - .notify = guestinfo_net_notify, .remove = guestinfo_net_remove, }; |
