Skip to content

Commit 13abb3e

Browse files
deoxxaawesomekling
authored andcommitted
Kernel: Remove now-unused singleton methods from our network devices
1 parent 93c1659 commit 13abb3e

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

Kernel/Net/E1000NetworkAdapter.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,10 @@ OwnPtr<E1000NetworkAdapter> E1000NetworkAdapter::autodetect()
107107
return make<E1000NetworkAdapter>(found_address, irq);
108108
}
109109

110-
static E1000NetworkAdapter* s_the;
111-
E1000NetworkAdapter* E1000NetworkAdapter::the()
112-
{
113-
return s_the;
114-
}
115-
116110
E1000NetworkAdapter::E1000NetworkAdapter(PCI::Address pci_address, u8 irq)
117111
: IRQHandler(irq)
118112
, m_pci_address(pci_address)
119113
{
120-
s_the = this;
121-
122114
set_interface_name("e1k");
123115

124116
kprintf("E1000: Found at PCI address %b:%b:%b\n", pci_address.bus(), pci_address.slot(), pci_address.function());

Kernel/Net/E1000NetworkAdapter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
#include <Kernel/IRQHandler.h>
55
#include <Kernel/Net/NetworkAdapter.h>
66
#include <Kernel/PCI.h>
7-
#include <Kernel/VM/MemoryManager.h>
87

98
class E1000NetworkAdapter final : public NetworkAdapter
109
, public IRQHandler {
1110
public:
12-
static E1000NetworkAdapter* the();
13-
1411
static OwnPtr<E1000NetworkAdapter> autodetect();
1512

1613
E1000NetworkAdapter(PCI::Address, u8 irq);

Kernel/Net/RTL8139NetworkAdapter.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,10 @@ OwnPtr<RTL8139NetworkAdapter> RTL8139NetworkAdapter::autodetect()
113113
return make<RTL8139NetworkAdapter>(found_address, irq);
114114
}
115115

116-
static RTL8139NetworkAdapter* s_the;
117-
RTL8139NetworkAdapter* RTL8139NetworkAdapter::the()
118-
{
119-
return s_the;
120-
}
121-
122116
RTL8139NetworkAdapter::RTL8139NetworkAdapter(PCI::Address pci_address, u8 irq)
123117
: IRQHandler(irq)
124118
, m_pci_address(pci_address)
125119
{
126-
s_the = this;
127-
128120
set_interface_name("rtl8139");
129121

130122
kprintf("RTL8139: Found at PCI address %b:%b:%b\n", pci_address.bus(), pci_address.slot(), pci_address.function());

Kernel/Net/RTL8139NetworkAdapter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

33
#include <AK/OwnPtr.h>
4-
#include <AK/RefPtr.h>
54
#include <Kernel/IRQHandler.h>
65
#include <Kernel/Net/NetworkAdapter.h>
76
#include <Kernel/PCI.h>
@@ -11,8 +10,6 @@
1110
class RTL8139NetworkAdapter final : public NetworkAdapter
1211
, public IRQHandler {
1312
public:
14-
static RTL8139NetworkAdapter* the();
15-
1613
static OwnPtr<RTL8139NetworkAdapter> autodetect();
1714

1815
RTL8139NetworkAdapter(PCI::Address, u8 irq);

0 commit comments

Comments
 (0)