Skip to content

Commit

Permalink
x86: Remove invalid DEVMETHOD methods for leaf devices
Browse files Browse the repository at this point in the history
None of these drivers are for bus devices, so bus_generic_* is not
appropriate.  Most of these were nops except that detach would
actually "succeed" (but not do any cleanup).

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47374
  • Loading branch information
bsdjhb committed Nov 1, 2024
1 parent 84553cc commit df61573
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 30 deletions.
4 changes: 0 additions & 4 deletions sys/amd64/amd64/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,10 +1066,6 @@ static device_method_t fpupnp_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, fpupnp_probe),
DEVMETHOD(device_attach, fpupnp_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};

Expand Down
4 changes: 0 additions & 4 deletions sys/i386/i386/npx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,6 @@ static device_method_t npxisa_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, npxisa_probe),
DEVMETHOD(device_attach, npxisa_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};

Expand Down
4 changes: 0 additions & 4 deletions sys/x86/isa/atpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,6 @@ static device_method_t atpic_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, atpic_probe),
DEVMETHOD(device_attach, atpic_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};

Expand Down
3 changes: 0 additions & 3 deletions sys/x86/isa/atrtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,6 @@ static device_method_t atrtc_isa_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, atrtc_probe),
DEVMETHOD(device_attach, atrtc_isa_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
/* XXX stop statclock? */
DEVMETHOD(device_resume, atrtc_resume),

Expand Down
3 changes: 0 additions & 3 deletions sys/x86/isa/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,6 @@ static device_method_t attimer_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, attimer_probe),
DEVMETHOD(device_attach, attimer_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, attimer_resume),
{ 0, 0 }
};
Expand Down
4 changes: 0 additions & 4 deletions sys/x86/isa/isa_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,6 @@ static device_method_t atdma_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, atdma_probe),
DEVMETHOD(device_attach, atdma_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};

Expand Down
4 changes: 0 additions & 4 deletions sys/x86/pci/pci_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,6 @@ static device_method_t pcibus_pnp_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, pcibus_pnp_probe),
DEVMETHOD(device_attach, pcibus_pnp_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};

Expand Down
4 changes: 0 additions & 4 deletions sys/x86/x86/nexus.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,6 @@ static device_method_t sysresource_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, sysresource_probe),
DEVMETHOD(device_attach, sysresource_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),

DEVMETHOD_END
};
Expand Down

0 comments on commit df61573

Please sign in to comment.