Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/vga_pci.c
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
vga_pci_suspend(device_t dev) | vga_pci_suspend(device_t dev) | ||||
{ | { | ||||
return (bus_generic_suspend(dev)); | return (bus_generic_suspend(dev)); | ||||
} | } | ||||
static int | static int | ||||
vga_pci_detach(device_t dev) | |||||
{ | |||||
int rc; | |||||
if ((rc = bus_generic_detach(dev)) == 0) | |||||
jhb: Cosmetic nits. Existing style in this file is to use 'error' instead of 'rc' and to not do… | |||||
rc = device_delete_children(dev); | |||||
return (rc); | |||||
} | |||||
static int | |||||
vga_pci_resume(device_t dev) | vga_pci_resume(device_t dev) | ||||
{ | { | ||||
return (bus_generic_resume(dev)); | return (bus_generic_resume(dev)); | ||||
} | } | ||||
/* Bus interface. */ | /* Bus interface. */ | ||||
▲ Show 20 Lines • Show All 321 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static device_method_t vga_pci_methods[] = { | static device_method_t vga_pci_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, vga_pci_probe), | DEVMETHOD(device_probe, vga_pci_probe), | ||||
DEVMETHOD(device_attach, vga_pci_attach), | DEVMETHOD(device_attach, vga_pci_attach), | ||||
DEVMETHOD(device_shutdown, bus_generic_shutdown), | DEVMETHOD(device_shutdown, bus_generic_shutdown), | ||||
DEVMETHOD(device_suspend, vga_pci_suspend), | DEVMETHOD(device_suspend, vga_pci_suspend), | ||||
DEVMETHOD(device_detach, vga_pci_detach), | |||||
DEVMETHOD(device_resume, vga_pci_resume), | DEVMETHOD(device_resume, vga_pci_resume), | ||||
/* Bus interface */ | /* Bus interface */ | ||||
DEVMETHOD(bus_read_ivar, vga_pci_read_ivar), | DEVMETHOD(bus_read_ivar, vga_pci_read_ivar), | ||||
DEVMETHOD(bus_write_ivar, vga_pci_write_ivar), | DEVMETHOD(bus_write_ivar, vga_pci_write_ivar), | ||||
DEVMETHOD(bus_setup_intr, vga_pci_setup_intr), | DEVMETHOD(bus_setup_intr, vga_pci_setup_intr), | ||||
DEVMETHOD(bus_teardown_intr, vga_pci_teardown_intr), | DEVMETHOD(bus_teardown_intr, vga_pci_teardown_intr), | ||||
DEVMETHOD(bus_alloc_resource, vga_pci_alloc_resource), | DEVMETHOD(bus_alloc_resource, vga_pci_alloc_resource), | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
Cosmetic nits. Existing style in this file is to use 'error' instead of 'rc' and to not do assignments inside of conditionals, so: