summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-04-04 13:03:45 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-04-04 13:03:45 +0000
commit2b96c2eb91adbafa5ee2b3906bdefb58c465f5d9 (patch)
treeefd0bcb0200eea705d7b1e0e386052a9981ad92e /sys/dev
parentdad7c5cadaecadd557fe3b1bb702f7ec544b7fef (diff)
Use config_suspend() instead of dereferencing ca_activate directly to
support drivers that do not need any specific suspend/resume magic and do not have an activate function. config_suspend() will automagically propagate the event to the children of the driver. Needed at least by kauaiata(4/macppc). ok deraadt@, mlarkin@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata_wdc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index 18f92a4b7d5..0e48df26b60 100644
--- a/sys/dev/ata/ata_wdc.c
+++ b/sys/dev/ata/ata_wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ata_wdc.c,v 1.48 2015/03/14 03:38:47 jsg Exp $ */
+/* $OpenBSD: ata_wdc.c,v 1.49 2015/04/04 13:03:44 mpi Exp $ */
/* $NetBSD: ata_wdc.c,v 1.21 1999/08/09 09:43:11 bouyer Exp $ */
/*
@@ -141,11 +141,7 @@ wd_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size, int op, voi
if (op == HIB_DONE) {
struct wdc_softc *wdc = chp->wdc;
- struct device *dv = &wdc->sc_dev;
- struct cfdata *cfd = dv->dv_cfdata;
-
- /* The ca_activate function for the parent controller */
- (cfd->cf_attach->ca_activate)(dv, DVACT_RESUME);
+ config_suspend(&wdc->sc_dev, DVACT_RESUME);
return (0);
}