diff options
| author | 2010-08-30 21:32:20 +0000 | |
|---|---|---|
| committer | 2010-08-30 21:32:20 +0000 | |
| commit | 0dd53b660c98dfb625d34dd93e916e7736f7b661 (patch) | |
| tree | e4bda3ba59adce5f43ae4ab53a4d24b303694f33 /sys/arch/beagle/dev/omap_com.c | |
| parent | Change powerhooks into activate functions, and provide stub powerhook (diff) | |
| download | wireguard-openbsd-0dd53b660c98dfb625d34dd93e916e7736f7b661.tar.xz wireguard-openbsd-0dd53b660c98dfb625d34dd93e916e7736f7b661.zip | |
lend a hand keeping beagle up-to-date with what is going on in powerhook
vs activate. It compiles.
Diffstat (limited to 'sys/arch/beagle/dev/omap_com.c')
| -rw-r--r-- | sys/arch/beagle/dev/omap_com.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/sys/arch/beagle/dev/omap_com.c b/sys/arch/beagle/dev/omap_com.c index 4bc45855173..c189293f524 100644 --- a/sys/arch/beagle/dev/omap_com.c +++ b/sys/arch/beagle/dev/omap_com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omap_com.c,v 1.2 2010/08/27 05:04:08 deraadt Exp $ */ +/* $OpenBSD: omap_com.c,v 1.3 2010/08/30 21:32:20 deraadt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. * All rights reserved. @@ -57,10 +57,12 @@ int omapuart_match(struct device *, void *, void *); void omapuart_attach(struct device *, struct device *, void *); +int omapuart_activate(struct device *, int); void omapuart_power(int why, void *); struct cfattach com_ahb_ca = { - sizeof (struct com_softc), omapuart_match, omapuart_attach + sizeof (struct com_softc), omapuart_match, omapuart_attach, NULL, + omapuart_activate }; int @@ -116,23 +118,22 @@ omapuart_attach(struct device *parent, struct device *self, void *aux) sc, sc->sc_dev.dv_xname); #if 0 - (void)powerhook_establish(&omapuart_power, sc); + (void)powerhook_establish(&omapuart_powerhook, sc); #endif } -#if 0 -void -omapuart_power(int why, void *arg) +int +omapuart_activate(struct device *self, int act) { - struct com_softc *sc = arg; + struct com_softc *sc = (struct com_softc *)self; bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; struct tty *tp = sc->sc_tty; - switch (why) { - case PWR_SUSPEND: + switch (act) { + case DVACT_SUSPEND: break; - case PWR_RESUME: + case DVACT_RESUME: if (sc->enabled) { sc->sc_initialize = 1; comparam(tp, &tp->t_termios); @@ -145,5 +146,13 @@ omapuart_power(int why, void *arg) } break; } + return 0; +} + +#if 0 +void +omapuart_power(int why, void *arg) +{ + omapuart_activate(arg, why); } #endif |
