diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-11-14 12:37:37 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-11-14 12:37:37 +0000 |
commit | ed458f8aea072af4bd85ade9f5872e76133fceb3 (patch) | |
tree | 9680564a5da54d02a0c87b8cd9a041a7fdc83fc9 /sys/dev | |
parent | 9cacad07e056cc49211ecf8b5e4b779cbc43e2d7 (diff) |
replace workqs with tasks for handling resume
from kimberley manning
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_athn_pci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/pci/if_athn_pci.c b/sys/dev/pci/if_athn_pci.c index 2bdc4d10735..09eca0bb162 100644 --- a/sys/dev/pci/if_athn_pci.c +++ b/sys/dev/pci/if_athn_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_pci.c,v 1.11 2011/01/08 10:02:32 damien Exp $ */ +/* $OpenBSD: if_athn_pci.c,v 1.12 2013/11/14 12:37:36 dlg Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -31,7 +31,7 @@ #include <sys/malloc.h> #include <sys/timeout.h> #include <sys/device.h> -#include <sys/workq.h> +#include <sys/task.h> #include <machine/bus.h> #include <machine/intr.h> @@ -69,7 +69,7 @@ struct athn_pci_softc { bus_space_handle_t sc_sh; bus_size_t sc_mapsize; int sc_cap_off; - struct workq_task sc_resume_wqt; + struct task sc_resume_t; }; int athn_pci_match(struct device *, void *, void *); @@ -130,6 +130,8 @@ athn_pci_attach(struct device *parent, struct device *self, void *aux) sc->ops.write = athn_pci_write; sc->ops.write_barrier = athn_pci_write_barrier; + task_set(&psc->sc_resume_t, athn_pci_resume, psc, NULL); + /* * Get the offset of the PCI Express Capability Structure in PCI * Configuration Space (Linux hardcodes it as 0x60.) @@ -219,8 +221,7 @@ athn_pci_activate(struct device *self, int act) athn_suspend(sc); break; case DVACT_RESUME: - workq_queue_task(NULL, &psc->sc_resume_wqt, 0, - athn_pci_resume, psc, NULL); + task_add(NULL, &psc->sc_resume_t); break; } |