From 80b34e32f1f3339c176b82cb506516aaee0c2f38 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 8 Jan 2010 20:07:15 +0000 Subject: [PATCH] Expand PMF_FN_* macros. --- sys/dev/audio.c | 12 +++--- sys/dev/hpc/hpcfb.c | 12 +++--- sys/dev/i2c/dbcool.c | 8 ++-- sys/dev/i2c/dbcool_var.h | 8 ++-- sys/dev/i2c/sdtemp.c | 12 +++--- sys/dev/ic/aic79xx_osm.c | 12 +++--- sys/dev/ic/aic7xxx_osm.c | 12 +++--- sys/dev/ic/atw.c | 6 +-- sys/dev/ic/atwvar.h | 4 +- sys/dev/ic/bwi.c | 8 ++-- sys/dev/ic/bwivar.h | 6 +-- sys/dev/ic/com.c | 8 ++-- sys/dev/ic/comvar.h | 6 +-- sys/dev/ic/gem.c | 8 ++-- sys/dev/ic/gemvar.h | 6 +-- sys/dev/ic/hpet.c | 8 ++-- sys/dev/ic/ne2000.c | 8 ++-- sys/dev/ic/ne2000var.h | 6 +-- sys/dev/ic/pckbc.c | 6 +-- sys/dev/ic/pckbcvar.h | 4 +- sys/dev/ic/rtw.c | 8 ++-- sys/dev/ic/rtwvar.h | 6 +-- sys/dev/ic/spic.c | 8 ++-- sys/dev/ic/spicvar.h | 6 +-- sys/dev/isa/aps.c | 12 +++--- sys/dev/isa/com_isa.c | 16 ++++---- sys/dev/isa/fd.c | 12 +++--- sys/dev/isa/sbdsp.c | 8 ++-- sys/dev/isa/ym.c | 12 +++--- sys/dev/pckbport/pckbd.c | 8 ++-- sys/dev/pckbport/pms.c | 12 +++--- sys/dev/pcmcia/bt3c.c | 12 +++--- sys/dev/pcmcia/btbc.c | 12 +++--- sys/dev/sbus/dbri.c | 12 +++--- sys/dev/sbus/p9100.c | 12 +++--- sys/dev/scsipi/sd.c | 8 ++-- sys/kern/kern_pmf.c | 88 ++++++++++++++++++++-------------------- sys/kern/subr_autoconf.c | 52 ++++++++++++------------ sys/rump/librump/rumpkern/emul.c | 8 ++-- sys/sys/device.h | 44 ++++++++++---------- sys/sys/pmf.h | 38 +++++++---------- 41 files changed, 272 insertions(+), 282 deletions(-) diff --git a/sys/dev/audio.c b/sys/dev/audio.c index a3ebca4d875..683d3fc5fe5 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.248 2009/09/29 15:58:54 sborrill Exp $ */ +/* $NetBSD: audio.c,v 1.249 2009/12/06 22:42:48 dyoung Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.248 2009/09/29 15:58:54 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.249 2009/12/06 22:42:48 dyoung Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -183,8 +183,8 @@ static void audio_idle(void *); static void audio_activity(device_t, devactive_t); #endif -static bool audio_suspend(device_t dv PMF_FN_PROTO); -static bool audio_resume(device_t dv PMF_FN_PROTO); +static bool audio_suspend(device_t dv, pmf_qual_t); +static bool audio_resume(device_t dv, pmf_qual_t); static void audio_volume_down(device_t); static void audio_volume_up(device_t); static void audio_volume_toggle(device_t); @@ -4070,7 +4070,7 @@ audio_activity(device_t dv, devactive_t type) #endif static bool -audio_suspend(device_t dv PMF_FN_ARGS) +audio_suspend(device_t dv, pmf_qual_t qual) { struct audio_softc *sc = device_private(dv); const struct audio_hw_if *hwp = sc->hw_if; @@ -4091,7 +4091,7 @@ audio_suspend(device_t dv PMF_FN_ARGS) } static bool -audio_resume(device_t dv PMF_FN_ARGS) +audio_resume(device_t dv, pmf_qual_t qual) { struct audio_softc *sc = device_private(dv); int s; diff --git a/sys/dev/hpc/hpcfb.c b/sys/dev/hpc/hpcfb.c index fa7160900f6..ee8c51c86a7 100644 --- a/sys/dev/hpc/hpcfb.c +++ b/sys/dev/hpc/hpcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfb.c,v 1.50 2009/04/05 02:14:41 uwe Exp $ */ +/* $NetBSD: hpcfb.c,v 1.51 2009/11/23 02:13:45 rmind Exp $ */ /*- * Copyright (c) 1999 @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.50 2009/04/05 02:14:41 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.51 2009/11/23 02:13:45 rmind Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcfb.h" @@ -198,8 +198,8 @@ static void hpcfb_cmap_reorder(struct hpcfb_fbconf *, struct hpcfb_devconfig *); static void hpcfb_power(int, void *); -static bool hpcfb_suspend(device_t PMF_FN_PROTO); -static bool hpcfb_resume(device_t PMF_FN_PROTO); +static bool hpcfb_suspend(device_t, pmf_qual_t); +static bool hpcfb_resume(device_t, pmf_qual_t); void hpcfb_cursor(void *, int, int, int); @@ -671,7 +671,7 @@ hpcfb_power(int why, void *arg) } static bool -hpcfb_suspend(device_t self PMF_FN_ARGS) +hpcfb_suspend(device_t self, pmf_qual_t qual) { struct hpcfb_softc *sc = device_private(self); @@ -680,7 +680,7 @@ hpcfb_suspend(device_t self PMF_FN_ARGS) } static bool -hpcfb_resume(device_t self PMF_FN_ARGS) +hpcfb_resume(device_t self, pmf_qual_t qual) { struct hpcfb_softc *sc = device_private(self); diff --git a/sys/dev/i2c/dbcool.c b/sys/dev/i2c/dbcool.c index d950bf7ac79..386d6859874 100644 --- a/sys/dev/i2c/dbcool.c +++ b/sys/dev/i2c/dbcool.c @@ -1,4 +1,4 @@ -/* $NetBSD: dbcool.c,v 1.12 2009/06/01 20:08:44 pgoyette Exp $ */ +/* $NetBSD: dbcool.c,v 1.13 2009/11/02 21:37:44 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.12 2009/06/01 20:08:44 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.13 2009/11/02 21:37:44 christos Exp $"); #include #include @@ -648,7 +648,7 @@ dbcool_detach(device_t self, int flags) } /* On suspend, we save the state of the SHDN bit, then set it */ -bool dbcool_pmf_suspend(device_t dev PMF_FN_ARGS) +bool dbcool_pmf_suspend(device_t dev, pmf_qual_t qual) { struct dbcool_softc *sc = device_private(dev); uint8_t reg, bit, cfg; @@ -672,7 +672,7 @@ bool dbcool_pmf_suspend(device_t dev PMF_FN_ARGS) } /* On resume, we restore the previous state of the SHDN bit */ -bool dbcool_pmf_resume(device_t dev PMF_FN_ARGS) +bool dbcool_pmf_resume(device_t dev, pmf_qual_t qual) { struct dbcool_softc *sc = device_private(dev); uint8_t reg, bit, cfg; diff --git a/sys/dev/i2c/dbcool_var.h b/sys/dev/i2c/dbcool_var.h index 34d9542e55b..ef932a46b8b 100644 --- a/sys/dev/i2c/dbcool_var.h +++ b/sys/dev/i2c/dbcool_var.h @@ -1,4 +1,4 @@ -/* $NetBSD: dbcool_var.h,v 1.5 2009/05/12 14:23:33 cegger Exp $ */ +/* $NetBSD: dbcool_var.h,v 1.6 2009/11/02 21:37:44 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dbcool_var.h,v 1.5 2009/05/12 14:23:33 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbcool_var.h,v 1.6 2009/11/02 21:37:44 christos Exp $"); #include @@ -147,7 +147,7 @@ uint8_t dbcool_readreg(struct dbcool_chipset *, uint8_t); void dbcool_writereg(struct dbcool_chipset *, uint8_t, uint8_t); void dbcool_setup(device_t); int dbcool_chip_ident(struct dbcool_chipset *); -bool dbcool_pmf_suspend(device_t PMF_FN_PROTO); -bool dbcool_pmf_resume(device_t PMF_FN_PROTO); +bool dbcool_pmf_suspend(device_t, pmf_qual_t); +bool dbcool_pmf_resume(device_t, pmf_qual_t); #endif /* def DBCOOLVAR_H */ diff --git a/sys/dev/i2c/sdtemp.c b/sys/dev/i2c/sdtemp.c index 5817b338864..2bbc628cdf0 100644 --- a/sys/dev/i2c/sdtemp.c +++ b/sys/dev/i2c/sdtemp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.7 2009/07/10 15:30:45 pgoyette Exp $ */ +/* $NetBSD: sdtemp.c,v 1.8 2010/01/01 15:43:49 pgoyette Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.7 2009/07/10 15:30:45 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.8 2010/01/01 15:43:49 pgoyette Exp $"); #include #include @@ -73,8 +73,8 @@ static int sdtemp_write_8(struct sdtemp_softc *, uint8_t, uint8_t); static int sdtemp_read_16(struct sdtemp_softc *, uint8_t, uint16_t *); static int sdtemp_write_16(struct sdtemp_softc *, uint8_t, uint16_t); static uint32_t sdtemp_decode_temp(struct sdtemp_softc *, uint16_t); -static bool sdtemp_pmf_suspend(device_t PMF_FN_PROTO); -static bool sdtemp_pmf_resume(device_t PMF_FN_PROTO); +static bool sdtemp_pmf_suspend(device_t, pmf_qual_t); +static bool sdtemp_pmf_resume(device_t, pmf_qual_t); struct sdtemp_dev_entry { const uint16_t sdtemp_mfg_id; @@ -482,7 +482,7 @@ sdtemp_refresh(struct sysmon_envsys *sme, envsys_data_t *edata) */ static bool -sdtemp_pmf_suspend(device_t dev PMF_FN_ARGS) +sdtemp_pmf_suspend(device_t dev, pmf_qual_t qual) { struct sdtemp_softc *sc = device_private(dev); int error; @@ -499,7 +499,7 @@ sdtemp_pmf_suspend(device_t dev PMF_FN_ARGS) } static bool -sdtemp_pmf_resume(device_t dev PMF_FN_ARGS) +sdtemp_pmf_resume(device_t dev, pmf_qual_t qual) { struct sdtemp_softc *sc = device_private(dev); int error; diff --git a/sys/dev/ic/aic79xx_osm.c b/sys/dev/ic/aic79xx_osm.c index 1ce5bccacd3..8e24e142a14 100644 --- a/sys/dev/ic/aic79xx_osm.c +++ b/sys/dev/ic/aic79xx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx_osm.c,v 1.28 2009/09/05 12:50:53 tsutsui Exp $ */ +/* $NetBSD: aic79xx_osm.c,v 1.29 2009/09/26 14:44:10 tsutsui Exp $ */ /* * Bus independent NetBSD shim for the aic7xxx based adaptec SCSI controllers @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.28 2009/09/05 12:50:53 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.29 2009/09/26 14:44:10 tsutsui Exp $"); #include #include @@ -64,8 +64,8 @@ static void ahd_setup_data(struct ahd_softc *ahd, struct scsipi_xfer *xs, static void ahd_set_recoveryscb(struct ahd_softc *ahd, struct scb *scb); #endif -static bool ahd_pmf_suspend(device_t PMF_FN_PROTO); -static bool ahd_pmf_resume(device_t PMF_FN_PROTO); +static bool ahd_pmf_suspend(device_t, pmf_qual_t); +static bool ahd_pmf_resume(device_t, pmf_qual_t); static bool ahd_pmf_shutdown(device_t, int); /* @@ -118,7 +118,7 @@ ahd_attach(struct ahd_softc *ahd) } static bool -ahd_pmf_suspend(device_t dev PMF_FN_ARGS) +ahd_pmf_suspend(device_t dev, pmf_qual_t qual) { struct ahd_softc *sc = device_private(dev); #if 0 @@ -130,7 +130,7 @@ ahd_pmf_suspend(device_t dev PMF_FN_ARGS) } static bool -ahd_pmf_resume(device_t dev PMF_FN_ARGS) +ahd_pmf_resume(device_t dev, pmf_qual_t qual) { #if 0 struct ahd_softc *sc = device_private(dev); diff --git a/sys/dev/ic/aic7xxx_osm.c b/sys/dev/ic/aic7xxx_osm.c index f7a5576aa52..45623ccc497 100644 --- a/sys/dev/ic/aic7xxx_osm.c +++ b/sys/dev/ic/aic7xxx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_osm.c,v 1.34 2009/09/12 19:16:35 tsutsui Exp $ */ +/* $NetBSD: aic7xxx_osm.c,v 1.35 2009/09/22 13:26:54 tsutsui Exp $ */ /* * Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.34 2009/09/12 19:16:35 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.35 2009/09/22 13:26:54 tsutsui Exp $"); #include #include @@ -60,8 +60,8 @@ static void ahc_set_recoveryscb(struct ahc_softc *ahc, struct scb *scb); static int ahc_ioctl(struct scsipi_channel *channel, u_long cmd, void *addr, int flag, struct proc *p); -static bool ahc_pmf_suspend(device_t PMF_FN_PROTO); -static bool ahc_pmf_resume(device_t PMF_FN_PROTO); +static bool ahc_pmf_suspend(device_t, pmf_qual_t); +static bool ahc_pmf_resume(device_t, pmf_qual_t); static bool ahc_pmf_shutdown(device_t, int); @@ -144,7 +144,7 @@ ahc_attach(struct ahc_softc *ahc) */ static bool -ahc_pmf_suspend(device_t dev PMF_FN_ARGS) +ahc_pmf_suspend(device_t dev, pmf_qual_t qual) { struct ahc_softc *sc = device_private(dev); #if 0 @@ -156,7 +156,7 @@ ahc_pmf_suspend(device_t dev PMF_FN_ARGS) } static bool -ahc_pmf_resume(device_t dev PMF_FN_ARGS) +ahc_pmf_resume(device_t dev, pmf_qual_t qual) { #if 0 struct ahc_softc *sc = device_private(dev); diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index c0d8e007867..00897599f0b 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $NetBSD: atw.c,v 1.146 2009/09/16 16:34:50 dyoung Exp $ */ +/* $NetBSD: atw.c,v 1.147 2009/11/12 19:30:49 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.146 2009/09/16 16:34:50 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.147 2009/11/12 19:30:49 dyoung Exp $"); #include "bpfilter.h" @@ -321,7 +321,7 @@ atw_activate(device_t self, enum devact act) } bool -atw_suspend(device_t self PMF_FN_ARGS) +atw_suspend(device_t self, pmf_qual_t qual) { struct atw_softc *sc = device_private(self); diff --git a/sys/dev/ic/atwvar.h b/sys/dev/ic/atwvar.h index b01ca6dc144..e6e8c0c13ed 100644 --- a/sys/dev/ic/atwvar.h +++ b/sys/dev/ic/atwvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: atwvar.h,v 1.32 2009/09/13 22:07:34 dyoung Exp $ */ +/* $NetBSD: atwvar.h,v 1.33 2009/09/16 16:34:50 dyoung Exp $ */ /* * Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. All rights reserved. @@ -448,6 +448,6 @@ int atw_detach(struct atw_softc *); int atw_activate(device_t, enum devact); int atw_intr(void *arg); bool atw_shutdown(device_t, int); -bool atw_suspend(device_t PMF_FN_PROTO); +bool atw_suspend(device_t, pmf_qual_t); #endif /* _DEV_IC_ATWVAR_H_ */ diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 25e880ec483..8418e683e54 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $NetBSD: bwi.c,v 1.10 2009/04/26 10:07:48 cegger Exp $ */ +/* $NetBSD: bwi.c,v 1.11 2009/07/25 23:43:06 cegger Exp $ */ /* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */ /* @@ -49,7 +49,7 @@ #include "bpfilter.h" #include -__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.10 2009/04/26 10:07:48 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.11 2009/07/25 23:43:06 cegger Exp $"); #include #include @@ -9729,7 +9729,7 @@ bwi_calc_rssi(struct bwi_softc *sc, const struct bwi_rxbuf_hdr *hdr) } bool -bwi_suspend(device_t dv PMF_FN_ARGS) +bwi_suspend(device_t dv, pmf_qual_t qual) { struct bwi_softc *sc = device_private(dv); @@ -9739,7 +9739,7 @@ bwi_suspend(device_t dv PMF_FN_ARGS) } bool -bwi_resume(device_t dv PMF_FN_ARGS) +bwi_resume(device_t dv, pmf_qual_t qual) { struct bwi_softc *sc = device_private(dv); diff --git a/sys/dev/ic/bwivar.h b/sys/dev/ic/bwivar.h index 6049715f464..cb90fc0d927 100644 --- a/sys/dev/ic/bwivar.h +++ b/sys/dev/ic/bwivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: bwivar.h,v 1.3 2009/04/23 20:24:23 kefren Exp $ */ +/* $NetBSD: bwivar.h,v 1.4 2009/04/26 10:07:48 cegger Exp $ */ /* $OpenBSD: bwivar.h,v 1.23 2008/02/25 20:36:54 mglocker Exp $ */ /* @@ -792,7 +792,7 @@ int bwi_attach(struct bwi_softc *); void bwi_detach(struct bwi_softc *); /* Power Management Framework */ -bool bwi_suspend(device_t db PMF_FN_ARGS); -bool bwi_resume(device_t db PMF_FN_ARGS); +bool bwi_suspend(device_t, pmf_qual_t); +bool bwi_resume(device_t, pmf_qual_t); #endif /* !_DEV_IC_BWIVAR_H */ diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 7cbfd7c1759..b561357b763 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.291 2009/11/23 02:13:46 rmind Exp $ */ +/* $NetBSD: com.c,v 1.292 2009/12/06 23:15:59 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.291 2009/11/23 02:13:46 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.292 2009/12/06 23:15:59 dyoung Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -2404,7 +2404,7 @@ com_cleanup(device_t self, int how) } bool -com_suspend(device_t self PMF_FN_ARGS) +com_suspend(device_t self, pmf_qual_t qual) { struct com_softc *sc = device_private(self); @@ -2420,7 +2420,7 @@ com_suspend(device_t self PMF_FN_ARGS) } bool -com_resume(device_t self PMF_FN_ARGS) +com_resume(device_t self, pmf_qual_t qual) { struct com_softc *sc = device_private(self); diff --git a/sys/dev/ic/comvar.h b/sys/dev/ic/comvar.h index 93e55cc5ac9..614f988025c 100644 --- a/sys/dev/ic/comvar.h +++ b/sys/dev/ic/comvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: comvar.h,v 1.67 2009/11/12 20:37:09 dyoung Exp $ */ +/* $NetBSD: comvar.h,v 1.68 2009/11/12 20:37:44 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -237,9 +237,9 @@ int comintr(void *); void com_attach_subr(struct com_softc *); int com_probe_subr(struct com_regs *); int com_detach(device_t, int); -bool com_resume(device_t PMF_FN_PROTO); +bool com_resume(device_t, pmf_qual_t); bool com_cleanup(device_t, int); -bool com_suspend(device_t PMF_FN_PROTO); +bool com_suspend(device_t, pmf_qual_t); #ifndef IPL_SERIAL #define IPL_SERIAL IPL_TTY diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 05aab568712..aeefcf414c7 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.88 2009/12/04 22:13:26 martin Exp $ */ +/* $NetBSD: gem.c,v 1.89 2009/12/05 16:43:25 jdc Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.88 2009/12/04 22:13:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.89 2009/12/05 16:43:25 jdc Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -2603,7 +2603,7 @@ gem_inten(struct gem_softc *sc) } bool -gem_resume(device_t self PMF_FN_ARGS) +gem_resume(device_t self, pmf_qual_t qual) { struct gem_softc *sc = device_private(self); @@ -2613,7 +2613,7 @@ gem_resume(device_t self PMF_FN_ARGS) } bool -gem_suspend(device_t self PMF_FN_ARGS) +gem_suspend(device_t self, pmf_qual_t qual) { struct gem_softc *sc = device_private(self); bus_space_tag_t t = sc->sc_bustag; diff --git a/sys/dev/ic/gemvar.h b/sys/dev/ic/gemvar.h index 887924c6907..c0455d9efa0 100644 --- a/sys/dev/ic/gemvar.h +++ b/sys/dev/ic/gemvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: gemvar.h,v 1.18 2008/02/01 10:53:25 jdc Exp $ */ +/* $NetBSD: gemvar.h,v 1.19 2009/07/27 18:10:53 dyoung Exp $ */ /* * @@ -308,8 +308,8 @@ do { \ #ifdef _KERNEL bool gem_shutdown(device_t, int); -bool gem_suspend(device_t PMF_FN_PROTO); -bool gem_resume(device_t PMF_FN_PROTO); +bool gem_suspend(device_t, pmf_qual_t); +bool gem_resume(device_t, pmf_qual_t); void gem_attach(struct gem_softc *, const uint8_t *); int gem_intr(void *); int gem_detach(struct gem_softc *, int); diff --git a/sys/dev/ic/hpet.c b/sys/dev/ic/hpet.c index 78a1e6f3383..2cca8662e2d 100644 --- a/sys/dev/ic/hpet.c +++ b/sys/dev/ic/hpet.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpet.c,v 1.7 2009/08/18 17:06:35 dyoung Exp $ */ +/* $NetBSD: hpet.c,v 1.8 2009/09/30 15:22:11 njoly Exp $ */ /* * Copyright (c) 2006 Nicolas Joly @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpet.c,v 1.7 2009/08/18 17:06:35 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpet.c,v 1.8 2009/09/30 15:22:11 njoly Exp $"); #include #include @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpet.c,v 1.7 2009/08/18 17:06:35 dyoung Exp $"); #include static u_int hpet_get_timecount(struct timecounter *); -static bool hpet_resume(device_t PMF_FN_PROTO); +static bool hpet_resume(device_t, pmf_qual_t); int hpet_detach(device_t dv, int flags) @@ -113,7 +113,7 @@ hpet_get_timecount(struct timecounter *tc) } static bool -hpet_resume(device_t dv PMF_FN_ARGS) +hpet_resume(device_t dv, pmf_qual_t qual) { struct hpet_softc *sc = device_private(dv); uint32_t val; diff --git a/sys/dev/ic/ne2000.c b/sys/dev/ic/ne2000.c index c42c7c5e107..748727e6277 100644 --- a/sys/dev/ic/ne2000.c +++ b/sys/dev/ic/ne2000.c @@ -1,4 +1,4 @@ -/* $NetBSD: ne2000.c,v 1.62 2009/05/05 12:37:24 nonaka Exp $ */ +/* $NetBSD: ne2000.c,v 1.63 2010/01/02 19:27:41 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.62 2009/05/05 12:37:24 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.63 2010/01/02 19:27:41 christos Exp $"); #include "opt_ipkdb.h" @@ -917,7 +917,7 @@ ne2000_ipkdb_attach(struct ipkdb_if *kip) #endif bool -ne2000_suspend(device_t self PMF_FN_ARGS) +ne2000_suspend(device_t self, pmf_qual_t qual) { struct ne2000_softc *sc = device_private(self); struct dp8390_softc *dsc = &sc->sc_dp8390; @@ -933,7 +933,7 @@ ne2000_suspend(device_t self PMF_FN_ARGS) } bool -ne2000_resume(device_t self PMF_FN_ARGS) +ne2000_resume(device_t self, pmf_qual_t qual) { struct ne2000_softc *sc = device_private(self); struct dp8390_softc *dsc = &sc->sc_dp8390; diff --git a/sys/dev/ic/ne2000var.h b/sys/dev/ic/ne2000var.h index 935a055224c..6594f761c24 100644 --- a/sys/dev/ic/ne2000var.h +++ b/sys/dev/ic/ne2000var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ne2000var.h,v 1.21 2009/05/05 12:37:24 nonaka Exp $ */ +/* $NetBSD: ne2000var.h,v 1.22 2010/01/02 19:27:41 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ int ne2000_ipkdb_attach(struct ipkdb_if *); #endif /* pmf(9) */ -bool ne2000_suspend(device_t PMF_FN_PROTO); -bool ne2000_resume(device_t PMF_FN_PROTO); +bool ne2000_suspend(device_t, pmf_qual_t); +bool ne2000_resume(device_t, pmf_qual_t); #endif /* _DEV_IC_NE2000VAR_H_ */ diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index c8adc664072..215c85cd53b 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbc.c,v 1.45 2008/06/04 16:29:14 drochner Exp $ */ +/* $NetBSD: pckbc.c,v 1.46 2009/05/12 14:25:18 cegger Exp $ */ /* * Copyright (c) 2004 Ben Harris. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.45 2008/06/04 16:29:14 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.46 2009/05/12 14:25:18 cegger Exp $"); #include #include @@ -680,7 +680,7 @@ pckbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, } bool -pckbc_resume(device_t dv PMF_FN_ARGS) +pckbc_resume(device_t dv, pmf_qual_t qual) { struct pckbc_softc *sc = device_private(dv); struct pckbc_internal *t; diff --git a/sys/dev/ic/pckbcvar.h b/sys/dev/ic/pckbcvar.h index 543324c2ad4..6e3e1728901 100644 --- a/sys/dev/ic/pckbcvar.h +++ b/sys/dev/ic/pckbcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pckbcvar.h,v 1.14 2008/02/29 06:17:36 dyoung Exp $ */ +/* $NetBSD: pckbcvar.h,v 1.15 2008/03/15 13:23:25 cube Exp $ */ /* * Copyright (c) 1998 @@ -112,6 +112,6 @@ void pckbcintr_soft(void *); int pckbc_machdep_cnattach(pckbc_tag_t, pckbc_slot_t); /* power management */ -bool pckbc_resume(device_t PMF_FN_PROTO); +bool pckbc_resume(device_t, pmf_qual_t); #endif /* _DEV_IC_PCKBCVAR_H_ */ diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 2fcb4de2adb..a4251d1ebdd 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtw.c,v 1.109 2009/09/16 16:34:50 dyoung Exp $ */ +/* $NetBSD: rtw.c,v 1.110 2009/10/19 23:19:39 rmind Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 David Young. All rights * reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.109 2009/09/16 16:34:50 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.110 2009/10/19 23:19:39 rmind Exp $"); #include "bpfilter.h" @@ -2493,7 +2493,7 @@ rtw_tune(struct rtw_softc *sc) } bool -rtw_suspend(device_t self PMF_FN_ARGS) +rtw_suspend(device_t self, pmf_qual_t qual) { int rc; struct rtw_softc *sc = device_private(self); @@ -2515,7 +2515,7 @@ rtw_suspend(device_t self PMF_FN_ARGS) } bool -rtw_resume(device_t self PMF_FN_ARGS) +rtw_resume(device_t self, pmf_qual_t qual) { struct rtw_softc *sc = device_private(self); diff --git a/sys/dev/ic/rtwvar.h b/sys/dev/ic/rtwvar.h index d4609d6ad31..87533bf659b 100644 --- a/sys/dev/ic/rtwvar.h +++ b/sys/dev/ic/rtwvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: rtwvar.h,v 1.38 2009/09/16 16:34:50 dyoung Exp $ */ +/* $NetBSD: rtwvar.h,v 1.39 2009/10/19 23:19:39 rmind Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. * @@ -502,8 +502,8 @@ void rtw_attach(struct rtw_softc *); int rtw_detach(struct rtw_softc *); int rtw_intr(void *); -bool rtw_suspend(device_t PMF_FN_PROTO); -bool rtw_resume(device_t PMF_FN_PROTO); +bool rtw_suspend(device_t, pmf_qual_t); +bool rtw_resume(device_t, pmf_qual_t); int rtw_activate(device_t, enum devact); diff --git a/sys/dev/ic/spic.c b/sys/dev/ic/spic.c index 68912e166e7..1d06ddfdbbb 100644 --- a/sys/dev/ic/spic.c +++ b/sys/dev/ic/spic.c @@ -1,4 +1,4 @@ -/* $NetBSD: spic.c,v 1.14 2008/04/28 20:23:51 martin Exp $ */ +/* $NetBSD: spic.c,v 1.15 2008/05/04 16:13:35 xtraeme Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.14 2008/04/28 20:23:51 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.15 2008/05/04 16:13:35 xtraeme Exp $"); #include #include @@ -290,7 +290,7 @@ spic_attach(struct spic_softc *sc) } bool -spic_suspend(device_t dev PMF_FN_ARGS) +spic_suspend(device_t dev, pmf_qual_t qual) { struct spic_softc *sc = device_private(dev); @@ -300,7 +300,7 @@ spic_suspend(device_t dev PMF_FN_ARGS) } bool -spic_resume(device_t dev PMF_FN_ARGS) +spic_resume(device_t dev, pmf_qual_t qual) { struct spic_softc *sc = device_private(dev); diff --git a/sys/dev/ic/spicvar.h b/sys/dev/ic/spicvar.h index 2b8a8ab8a28..76a1567aaf1 100644 --- a/sys/dev/ic/spicvar.h +++ b/sys/dev/ic/spicvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: spicvar.h,v 1.4 2008/02/29 06:17:36 dyoung Exp $ */ +/* $NetBSD: spicvar.h,v 1.5 2008/05/04 16:13:35 xtraeme Exp $ */ #include @@ -23,7 +23,7 @@ struct spic_softc { }; void spic_attach(struct spic_softc *); -bool spic_suspend(device_t PMF_FN_PROTO); -bool spic_resume(device_t PMF_FN_PROTO); +bool spic_suspend(device_t, pmf_qual_t); +bool spic_resume(device_t, pmf_qual_t); int spic_intr(void *); diff --git a/sys/dev/isa/aps.c b/sys/dev/isa/aps.c index bc88dffcf3c..74aeaad02d3 100644 --- a/sys/dev/isa/aps.c +++ b/sys/dev/isa/aps.c @@ -1,4 +1,4 @@ -/* $NetBSD: aps.c,v 1.7 2008/02/29 06:14:55 dyoung Exp $ */ +/* $NetBSD: aps.c,v 1.8 2008/04/04 09:41:40 xtraeme Exp $ */ /* $OpenBSD: aps.c,v 1.15 2007/05/19 19:14:11 tedu Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aps.c,v 1.7 2008/02/29 06:14:55 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aps.c,v 1.8 2008/04/04 09:41:40 xtraeme Exp $"); #include #include @@ -112,8 +112,8 @@ static uint8_t aps_mem_read_1(bus_space_tag_t, bus_space_handle_t, int, uint8_t); static void aps_refresh_sensor_data(struct aps_softc *sc); static void aps_refresh(void *); -static bool aps_suspend(device_t PMF_FN_PROTO); -static bool aps_resume(device_t PMF_FN_PROTO); +static bool aps_suspend(device_t, pmf_qual_t); +static bool aps_resume(device_t, pmf_qual_t); CFATTACH_DECL_NEW(aps, sizeof(struct aps_softc), aps_match, aps_attach, aps_detach, NULL); @@ -401,7 +401,7 @@ aps_refresh(void *arg) } static bool -aps_suspend(device_t dv PMF_FN_ARGS) +aps_suspend(device_t dv, pmf_qual_t qual) { struct aps_softc *sc = device_private(dv); @@ -411,7 +411,7 @@ aps_suspend(device_t dv PMF_FN_ARGS) } static bool -aps_resume(device_t dv PMF_FN_ARGS) +aps_resume(device_t dv, pmf_qual_t qual) { struct aps_softc *sc = device_private(dv); diff --git a/sys/dev/isa/com_isa.c b/sys/dev/isa/com_isa.c index 2664012f171..c0a4787d6a0 100644 --- a/sys/dev/isa/com_isa.c +++ b/sys/dev/isa/com_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_isa.c,v 1.36 2009/11/12 20:28:32 dyoung Exp $ */ +/* $NetBSD: com_isa.c,v 1.37 2009/11/23 02:13:46 rmind Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.36 2009/11/12 20:28:32 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.37 2009/11/23 02:13:46 rmind Exp $"); #include #include @@ -95,8 +95,8 @@ struct com_isa_softc { int sc_irq; }; -static bool com_isa_suspend(device_t PMF_FN_PROTO); -static bool com_isa_resume(device_t PMF_FN_PROTO); +static bool com_isa_suspend(device_t, pmf_qual_t); +static bool com_isa_resume(device_t, pmf_qual_t); int com_isa_probe(device_t, cfdata_t , void *); void com_isa_attach(device_t, device_t, void *); @@ -218,11 +218,11 @@ com_isa_attach(device_t parent, device_t self, void *aux) } static bool -com_isa_suspend(device_t self PMF_FN_ARGS) +com_isa_suspend(device_t self, pmf_qual_t qual) { struct com_isa_softc *isc = device_private(self); - if (!com_suspend(self PMF_FN_CALL)) + if (!com_suspend(self, qual)) return false; isa_intr_disestablish(isc->sc_ic, isc->sc_ih); @@ -232,7 +232,7 @@ com_isa_suspend(device_t self PMF_FN_ARGS) } static bool -com_isa_resume(device_t self PMF_FN_ARGS) +com_isa_resume(device_t self, pmf_qual_t qual) { struct com_isa_softc *isc = device_private(self); struct com_softc *sc = &isc->sc_com; @@ -240,7 +240,7 @@ com_isa_resume(device_t self PMF_FN_ARGS) isc->sc_ih = isa_intr_establish(isc->sc_ic, isc->sc_irq, IST_EDGE, IPL_SERIAL, comintr, sc); - return com_resume(self PMF_FN_CALL); + return com_resume(self, qual); } static int diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 4415272d56e..dbc55dab756 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.92 2009/05/12 08:44:19 cegger Exp $ */ +/* $NetBSD: fd.c,v 1.93 2009/06/05 21:52:31 haad Exp $ */ /*- * Copyright (c) 1998, 2003, 2008 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.92 2009/05/12 08:44:19 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.93 2009/06/05 21:52:31 haad Exp $"); #include "rnd.h" #include "opt_ddb.h" @@ -208,8 +208,8 @@ void fdattach(device_t, device_t, void *); static int fddetach(device_t, int); static int fdcintr1(struct fdc_softc *); static void fdcintrcb(void *); -static bool fdcsuspend(device_t PMF_FN_PROTO); -static bool fdcresume(device_t PMF_FN_PROTO); +static bool fdcsuspend(device_t, pmf_qual_t); +static bool fdcresume(device_t, pmf_qual_t); extern struct cfdriver fd_cd; @@ -287,7 +287,7 @@ fdprint(void *aux, const char *fdc) } static bool -fdcresume(device_t self PMF_FN_ARGS) +fdcresume(device_t self, pmf_qual_t qual) { struct fdc_softc *fdc = device_private(self); @@ -298,7 +298,7 @@ fdcresume(device_t self PMF_FN_ARGS) } static bool -fdcsuspend(device_t self PMF_FN_ARGS) +fdcsuspend(device_t self, pmf_qual_t qual) { struct fdc_softc *fdc = device_private(self); int drive; diff --git a/sys/dev/isa/sbdsp.c b/sys/dev/isa/sbdsp.c index 7a8fe32002c..a4f6d17cd12 100644 --- a/sys/dev/isa/sbdsp.c +++ b/sys/dev/isa/sbdsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbdsp.c,v 1.131 2008/04/28 20:23:52 martin Exp $ */ +/* $NetBSD: sbdsp.c,v 1.132 2009/09/01 21:47:30 jmcneill Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.131 2008/04/28 20:23:52 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbdsp.c,v 1.132 2009/09/01 21:47:30 jmcneill Exp $"); #include "midi.h" #include "mpu.h" @@ -224,7 +224,7 @@ static int sbdsp_adjust(int, int); int sbdsp_midi_intr(void *); -static bool sbdsp_resume(device_t PMF_FN_PROTO); +static bool sbdsp_resume(device_t, pmf_qual_t); #ifdef AUDIO_DEBUG void sb_printsc(struct sbdsp_softc *); @@ -440,7 +440,7 @@ sbdsp_attach(struct sbdsp_softc *sc) } static bool -sbdsp_resume(device_t dv PMF_FN_ARGS) +sbdsp_resume(device_t dv, pmf_qual_t qual) { struct sbdsp_softc *sc = device_private(dv); diff --git a/sys/dev/isa/ym.c b/sys/dev/isa/ym.c index 5e23a81bab7..34923dcd001 100644 --- a/sys/dev/isa/ym.c +++ b/sys/dev/isa/ym.c @@ -1,4 +1,4 @@ -/* $NetBSD: ym.c,v 1.36 2010/01/02 01:42:49 christos Exp $ */ +/* $NetBSD: ym.c,v 1.37 2010/01/02 02:37:08 christos Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.36 2010/01/02 01:42:49 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ym.c,v 1.37 2010/01/02 02:37:08 christos Exp $"); #include "mpu_ym.h" #include "opt_ym.h" @@ -162,8 +162,8 @@ static void ym_hvol_to_master_gain(struct ym_softc *); static void ym_set_mic_gain(struct ym_softc *, int); static void ym_set_3d(struct ym_softc *, mixer_ctrl_t *, struct ad1848_volume *, int); -static bool ym_suspend(device_t PMF_FN_PROTO); -static bool ym_resume(device_t PMF_FN_PROTO); +static bool ym_suspend(device_t, pmf_qual_t); +static bool ym_resume(device_t, pmf_qual_t); const struct audio_hw_if ym_hw_if = { @@ -1107,7 +1107,7 @@ ym_restore_codec_regs(struct ym_softc *sc) * DMA state should also be restored. FIXME. */ static bool -ym_suspend(device_t self PMF_FN_ARGS) +ym_suspend(device_t self, pmf_qual_t qual) { struct ym_softc *sc = device_private(self); int s; @@ -1144,7 +1144,7 @@ ym_suspend(device_t self PMF_FN_ARGS) } static bool -ym_resume(device_t self PMF_FN_ARGS) +ym_resume(device_t self, pmf_qual_t qual) { struct ym_softc *sc = device_private(self); int i, xmax; diff --git a/sys/dev/pckbport/pckbd.c b/sys/dev/pckbport/pckbd.c index 07287c6ca29..71e0b2b541a 100644 --- a/sys/dev/pckbport/pckbd.c +++ b/sys/dev/pckbport/pckbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbd.c,v 1.26 2009/03/08 15:06:56 ad Exp $ */ +/* $NetBSD: pckbd.c,v 1.27 2009/07/16 20:44:54 jakllsch Exp $ */ /*- * Copyright (c) 1998, 2009 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.26 2009/03/08 15:06:56 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.27 2009/07/16 20:44:54 jakllsch Exp $"); #include #include @@ -236,7 +236,7 @@ pckbd_is_console(pckbport_tag_t tag, pckbport_slot_t slot) } static bool -pckbd_suspend(device_t dv PMF_FN_ARGS) +pckbd_suspend(device_t dv, pmf_qual_t qual) { struct pckbd_softc *sc = device_private(dv); u_char cmd[1]; @@ -259,7 +259,7 @@ pckbd_suspend(device_t dv PMF_FN_ARGS) } static bool -pckbd_resume(device_t dv PMF_FN_ARGS) +pckbd_resume(device_t dv, pmf_qual_t qual) { struct pckbd_softc *sc = device_private(dv); u_char cmd[1], resp[1]; diff --git a/sys/dev/pckbport/pms.c b/sys/dev/pckbport/pms.c index dda0944e755..3529481a14b 100644 --- a/sys/dev/pckbport/pms.c +++ b/sys/dev/pckbport/pms.c @@ -1,4 +1,4 @@ -/* $NetBSD: pms.c,v 1.27 2008/12/14 00:42:33 jmcneill Exp $ */ +/* $NetBSD: pms.c,v 1.28 2009/03/08 15:06:56 ad Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.27 2008/12/14 00:42:33 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.28 2009/03/08 15:06:56 ad Exp $"); #include "opt_pms.h" @@ -90,8 +90,8 @@ int pms_enable(void *); int pms_ioctl(void *, u_long, void *, int, struct lwp *); void pms_disable(void *); -static bool pms_suspend(device_t PMF_FN_PROTO); -static bool pms_resume(device_t PMF_FN_PROTO); +static bool pms_suspend(device_t, pmf_qual_t); +static bool pms_resume(device_t, pmf_qual_t); const struct wsmouse_accessops pms_accessops = { pms_enable, @@ -343,7 +343,7 @@ pms_disable(void *v) } static bool -pms_suspend(device_t dv PMF_FN_ARGS) +pms_suspend(device_t dv, pmf_qual_t qual) { struct pms_softc *sc = device_private(dv); @@ -354,7 +354,7 @@ pms_suspend(device_t dv PMF_FN_ARGS) } static bool -pms_resume(device_t dv PMF_FN_ARGS) +pms_resume(device_t dv, pmf_qual_t qual) { struct pms_softc *sc = device_private(dv); diff --git a/sys/dev/pcmcia/bt3c.c b/sys/dev/pcmcia/bt3c.c index e502f71da03..5478577325a 100644 --- a/sys/dev/pcmcia/bt3c.c +++ b/sys/dev/pcmcia/bt3c.c @@ -1,4 +1,4 @@ -/* $NetBSD: bt3c.c,v 1.18 2008/04/06 18:55:33 plunky Exp $ */ +/* $NetBSD: bt3c.c,v 1.19 2009/05/12 13:18:04 cegger Exp $ */ /*- * Copyright (c) 2005 Iain D. Hibbert, @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bt3c.c,v 1.18 2008/04/06 18:55:33 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bt3c.c,v 1.19 2009/05/12 13:18:04 cegger Exp $"); #include #include @@ -135,8 +135,8 @@ struct bt3c_softc { static int bt3c_match(device_t, cfdata_t, void *); static void bt3c_attach(device_t, device_t, void *); static int bt3c_detach(device_t, int); -static bool bt3c_suspend(device_t PMF_FN_PROTO); -static bool bt3c_resume(device_t PMF_FN_PROTO); +static bool bt3c_suspend(device_t, pmf_qual_t); +static bool bt3c_resume(device_t, pmf_qual_t); CFATTACH_DECL_NEW(bt3c, sizeof(struct bt3c_softc), bt3c_match, bt3c_attach, bt3c_detach, NULL); @@ -1019,7 +1019,7 @@ bt3c_detach(device_t self, int flags) } static bool -bt3c_suspend(device_t self PMF_FN_ARGS) +bt3c_suspend(device_t self, pmf_qual_t qual) { struct bt3c_softc *sc = device_private(self); @@ -1032,7 +1032,7 @@ bt3c_suspend(device_t self PMF_FN_ARGS) } static bool -bt3c_resume(device_t self PMF_FN_ARGS) +bt3c_resume(device_t self, pmf_qual_t qual) { struct bt3c_softc *sc = device_private(self); diff --git a/sys/dev/pcmcia/btbc.c b/sys/dev/pcmcia/btbc.c index b7391f2dfeb..8e7dbdaf49d 100644 --- a/sys/dev/pcmcia/btbc.c +++ b/sys/dev/pcmcia/btbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: btbc.c,v 1.12 2008/04/06 18:55:33 plunky Exp $ */ +/* $NetBSD: btbc.c,v 1.13 2009/05/12 13:18:04 cegger Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: btbc.c,v 1.12 2008/04/06 18:55:33 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btbc.c,v 1.13 2009/05/12 13:18:04 cegger Exp $"); #include #include @@ -104,8 +104,8 @@ struct btbc_softc { static int btbc_match(device_t, cfdata_t, void *); static void btbc_attach(device_t, device_t, void *); static int btbc_detach(device_t, int); -static bool btbc_suspend(device_t PMF_FN_PROTO); -static bool btbc_resume(device_t PMF_FN_PROTO); +static bool btbc_suspend(device_t, pmf_qual_t); +static bool btbc_resume(device_t, pmf_qual_t); static void btbc_activity_led_timeout(void *); static void btbc_enable_activity_led(struct btbc_softc *); @@ -224,7 +224,7 @@ btbc_detach(device_t self, int flags) } static bool -btbc_suspend(device_t self PMF_FN_ARGS) +btbc_suspend(device_t self, pmf_qual_t qual) { struct btbc_softc *sc = device_private(self); @@ -238,7 +238,7 @@ btbc_suspend(device_t self PMF_FN_ARGS) static bool -btbc_resume(device_t self PMF_FN_ARGS) +btbc_resume(device_t self, pmf_qual_t qual) { struct btbc_softc *sc = device_private(self); diff --git a/sys/dev/sbus/dbri.c b/sys/dev/sbus/dbri.c index 5fa133a6f83..7480a5f6ce7 100644 --- a/sys/dev/sbus/dbri.c +++ b/sys/dev/sbus/dbri.c @@ -1,4 +1,4 @@ -/* $NetBSD: dbri.c,v 1.26 2010/01/02 01:43:42 christos Exp $ */ +/* $NetBSD: dbri.c,v 1.27 2010/01/02 04:12:07 tsutsui Exp $ */ /* * Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de) @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.26 2010/01/02 01:43:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.27 2010/01/02 04:12:07 tsutsui Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -162,8 +162,8 @@ static void dbri_free(void *, void *, struct malloc_type *); static paddr_t dbri_mappage(void *, void *, off_t, int); static void dbri_set_power(struct dbri_softc *, int); static void dbri_bring_up(struct dbri_softc *); -static bool dbri_suspend(device_t PMF_FN_PROTO); -static bool dbri_resume(device_t PMF_FN_PROTO); +static bool dbri_suspend(device_t, pmf_qual_t); +static bool dbri_resume(device_t, pmf_qual_t); /* stupid support routines */ static uint32_t reverse_bytes(uint32_t, int); @@ -2173,7 +2173,7 @@ dbri_close(void *cookie) } static bool -dbri_suspend(device_t self PMF_FN_ARGS) +dbri_suspend(device_t self, pmf_qual_t qual) { struct dbri_softc *sc = device_private(self); @@ -2182,7 +2182,7 @@ dbri_suspend(device_t self PMF_FN_ARGS) } static bool -dbri_resume(device_t self PMF_FN_ARGS) +dbri_resume(device_t self, pmf_qual_t qual) { struct dbri_softc *sc = device_private(self); diff --git a/sys/dev/sbus/p9100.c b/sys/dev/sbus/p9100.c index 86a36a53506..1b8d6ea4dd4 100644 --- a/sys/dev/sbus/p9100.c +++ b/sys/dev/sbus/p9100.c @@ -1,4 +1,4 @@ -/* $NetBSD: p9100.c,v 1.49 2009/09/17 16:39:48 tsutsui Exp $ */ +/* $NetBSD: p9100.c,v 1.50 2009/09/19 11:58:06 tsutsui Exp $ */ /*- * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.49 2009/09/17 16:39:48 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.50 2009/09/19 11:58:06 tsutsui Exp $"); #include #include @@ -236,8 +236,8 @@ static int p9100_intr(void *); #endif /* power management stuff */ -static bool p9100_suspend(device_t PMF_FN_PROTO); -static bool p9100_resume(device_t PMF_FN_PROTO); +static bool p9100_suspend(device_t, pmf_qual_t); +static bool p9100_resume(device_t, pmf_qual_t); #if NTCTRL > 0 static void p9100_set_extvga(void *, int); @@ -925,7 +925,7 @@ p9100_get_video(struct p9100_softc *sc) } static bool -p9100_suspend(device_t dev PMF_FN_ARGS) +p9100_suspend(device_t dev, pmf_qual_t qual) { struct p9100_softc *sc = device_private(dev); @@ -946,7 +946,7 @@ p9100_suspend(device_t dev PMF_FN_ARGS) } static bool -p9100_resume(device_t dev PMF_FN_ARGS) +p9100_resume(device_t dev, pmf_qual_t qual) { struct p9100_softc *sc = device_private(dev); diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index ebd34f3e783..cba1537cedb 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.289 2009/08/03 09:40:45 jnemeth Exp $ */ +/* $NetBSD: sd.c,v 1.290 2009/10/21 21:12:05 rmind Exp $ */ /*- * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.289 2009/08/03 09:40:45 jnemeth Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.290 2009/10/21 21:12:05 rmind Exp $"); #include "opt_scsi.h" #include "rnd.h" @@ -100,7 +100,7 @@ static int sdgetdisklabel(struct sd_softc *); static void sdstart(struct scsipi_periph *); static void sdrestart(void *); static void sddone(struct scsipi_xfer *, int); -static bool sd_suspend(device_t PMF_FN_PROTO); +static bool sd_suspend(device_t, pmf_qual_t); static bool sd_shutdown(device_t, int); static int sd_interpret_sense(struct scsipi_xfer *); static int sdlastclose(device_t); @@ -1338,7 +1338,7 @@ sd_shutdown(device_t self, int how) } static bool -sd_suspend(device_t dv PMF_FN_ARGS) +sd_suspend(device_t dv, pmf_qual_t qual) { return sd_shutdown(dv, boothowto); /* XXX no need to poll */ } diff --git a/sys/kern/kern_pmf.c b/sys/kern/kern_pmf.c index 31d522ec7ad..d7a33a9d6a7 100644 --- a/sys/kern/kern_pmf.c +++ b/sys/kern/kern_pmf.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_pmf.c,v 1.29 2009/09/16 16:34:50 dyoung Exp $ */ +/* $NetBSD: kern_pmf.c,v 1.30 2009/10/27 02:55:07 rmind Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.29 2009/09/16 16:34:50 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.30 2009/10/27 02:55:07 rmind Exp $"); #include #include @@ -116,8 +116,8 @@ static struct pool pew_pl; static pmf_event_workitem_t *pmf_event_workitem_get(void); static void pmf_event_workitem_put(pmf_event_workitem_t *); -bool pmf_device_resume_locked(device_t PMF_FN_PROTO); -bool pmf_device_suspend_locked(device_t PMF_FN_PROTO); +bool pmf_device_resume_locked(device_t, pmf_qual_t); +bool pmf_device_suspend_locked(device_t, pmf_qual_t); static bool device_pmf_any_suspensor(device_t, devact_level_t); static bool @@ -229,7 +229,7 @@ pmf_check_system_drivers(void) } bool -pmf_system_bus_resume(PMF_FN_ARGS1) +pmf_system_bus_resume(pmf_qual_t qual) { bool rv; device_t curdev; @@ -248,7 +248,7 @@ pmf_system_bus_resume(PMF_FN_ARGS1) aprint_debug(" %s", device_xname(curdev)); - if (!device_pmf_bus_resume(curdev PMF_FN_CALL)) { + if (!device_pmf_bus_resume(curdev, qual)) { rv = false; aprint_debug("(failed)"); } @@ -260,7 +260,7 @@ pmf_system_bus_resume(PMF_FN_ARGS1) } bool -pmf_system_resume(PMF_FN_ARGS1) +pmf_system_resume(pmf_qual_t qual) { bool rv; device_t curdev, parent; @@ -284,7 +284,7 @@ pmf_system_resume(PMF_FN_ARGS1) aprint_debug(" %s", device_xname(curdev)); - if (!pmf_device_resume(curdev PMF_FN_CALL)) { + if (!pmf_device_resume(curdev, qual)) { rv = false; aprint_debug("(failed)"); } @@ -301,7 +301,7 @@ pmf_system_resume(PMF_FN_ARGS1) } bool -pmf_system_suspend(PMF_FN_ARGS1) +pmf_system_suspend(pmf_qual_t qual) { device_t curdev; deviter_t di; @@ -338,7 +338,7 @@ pmf_system_suspend(PMF_FN_ARGS1) aprint_debug(" %s", device_xname(curdev)); /* XXX joerg check return value and abort suspend */ - if (!pmf_device_suspend(curdev PMF_FN_CALL)) + if (!pmf_device_suspend(curdev, qual)) aprint_debug("(failed)"); } deviter_release(&di); @@ -410,8 +410,8 @@ pmf_get_platform(const char *key) bool pmf_device_register1(device_t dev, - bool (*suspend)(device_t PMF_FN_PROTO), - bool (*resume)(device_t PMF_FN_PROTO), + bool (*suspend)(device_t, pmf_qual_t), + bool (*resume)(device_t, pmf_qual_t), bool (*shutdown)(device_t, int)) { if (!device_pmf_driver_register(dev, suspend, resume, shutdown)) @@ -676,7 +676,7 @@ pmf_self_suspensor_init(device_t dev, struct device_suspensor *ds, } bool -pmf_device_suspend(device_t dev PMF_FN_ARGS) +pmf_device_suspend(device_t dev, pmf_qual_t qual) { bool rc; @@ -687,7 +687,7 @@ pmf_device_suspend(device_t dev PMF_FN_ARGS) if (!device_pmf_lock(dev)) return false; - rc = pmf_device_suspend_locked(dev PMF_FN_CALL); + rc = pmf_device_suspend_locked(dev, qual); device_pmf_unlock(dev); @@ -696,28 +696,28 @@ pmf_device_suspend(device_t dev PMF_FN_ARGS) } bool -pmf_device_suspend_locked(device_t dev PMF_FN_ARGS) +pmf_device_suspend_locked(device_t dev, pmf_qual_t qual) { - if (!device_pmf_add_suspensor(dev PMF_FN_CALL)) + if (!device_pmf_add_suspensor(dev, qual)) return false; PMF_TRANSITION_PRINTF2(1, ("%s: class suspend\n", device_xname(dev))); - if (!device_pmf_class_suspend(dev PMF_FN_CALL)) + if (!device_pmf_class_suspend(dev, qual)) return false; PMF_TRANSITION_PRINTF2(1, ("%s: driver suspend\n", device_xname(dev))); - if (!device_pmf_driver_suspend(dev PMF_FN_CALL)) + if (!device_pmf_driver_suspend(dev, qual)) return false; PMF_TRANSITION_PRINTF2(1, ("%s: bus suspend\n", device_xname(dev))); - if (!device_pmf_bus_suspend(dev PMF_FN_CALL)) + if (!device_pmf_bus_suspend(dev, qual)) return false; return true; } bool -pmf_device_resume(device_t dev PMF_FN_ARGS) +pmf_device_resume(device_t dev, pmf_qual_t qual) { bool rc; @@ -728,7 +728,7 @@ pmf_device_resume(device_t dev PMF_FN_ARGS) if (!device_pmf_lock(dev)) return false; - rc = pmf_device_resume_locked(dev PMF_FN_CALL); + rc = pmf_device_resume_locked(dev, qual); device_pmf_unlock(dev); @@ -737,30 +737,30 @@ pmf_device_resume(device_t dev PMF_FN_ARGS) } bool -pmf_device_resume_locked(device_t dev PMF_FN_ARGS) +pmf_device_resume_locked(device_t dev, pmf_qual_t qual) { - device_pmf_remove_suspensor(dev PMF_FN_CALL); + device_pmf_remove_suspensor(dev, qual); if (device_pmf_any_suspensor(dev, DEVACT_LEVEL_FULL)) return true; PMF_TRANSITION_PRINTF2(1, ("%s: bus resume\n", device_xname(dev))); - if (!device_pmf_bus_resume(dev PMF_FN_CALL)) + if (!device_pmf_bus_resume(dev, qual)) return false; PMF_TRANSITION_PRINTF2(1, ("%s: driver resume\n", device_xname(dev))); - if (!device_pmf_driver_resume(dev PMF_FN_CALL)) + if (!device_pmf_driver_resume(dev, qual)) return false; PMF_TRANSITION_PRINTF2(1, ("%s: class resume\n", device_xname(dev))); - if (!device_pmf_class_resume(dev PMF_FN_CALL)) + if (!device_pmf_class_resume(dev, qual)) return false; return true; } bool -pmf_device_recursive_suspend(device_t dv PMF_FN_ARGS) +pmf_device_recursive_suspend(device_t dv, pmf_qual_t qual) { bool rv = true; device_t curdev; @@ -780,7 +780,7 @@ pmf_device_recursive_suspend(device_t dv PMF_FN_ARGS) } deviter_release(&di); - return rv && pmf_device_suspend(dv PMF_FN_CALL); + return rv && pmf_device_suspend(dv, qual); } void @@ -791,7 +791,7 @@ pmf_qual_recursive_copy(struct pmf_qual *dst, pmf_qual_t src) } bool -pmf_device_recursive_resume(device_t dv PMF_FN_ARGS) +pmf_device_recursive_resume(device_t dv, pmf_qual_t qual) { device_t parent; struct pmf_qual pq; @@ -807,11 +807,11 @@ pmf_device_recursive_resume(device_t dv PMF_FN_ARGS) return false; } - return pmf_device_resume(dv PMF_FN_CALL); + return pmf_device_resume(dv, qual); } bool -pmf_device_descendants_release(device_t dv PMF_FN_ARGS) +pmf_device_descendants_release(device_t dv, pmf_qual_t qual) { bool rv = true; device_t curdev; @@ -821,8 +821,8 @@ pmf_device_descendants_release(device_t dv PMF_FN_ARGS) curdev = deviter_next(&di)) { if (device_parent(curdev) != dv) continue; - device_pmf_remove_suspensor(curdev PMF_FN_CALL); - if (!pmf_device_descendants_release(curdev PMF_FN_CALL)) { + device_pmf_remove_suspensor(curdev, qual); + if (!pmf_device_descendants_release(curdev, qual)) { rv = false; break; } @@ -832,20 +832,20 @@ pmf_device_descendants_release(device_t dv PMF_FN_ARGS) } bool -pmf_device_descendants_resume(device_t dv PMF_FN_ARGS) +pmf_device_descendants_resume(device_t dv, pmf_qual_t qual) { bool rv = true; device_t curdev; deviter_t di; - KASSERT(pmf_qual_descend_ok(PMF_FN_CALL1)); + KASSERT(pmf_qual_descend_ok(qual)); for (curdev = deviter_first(&di, 0); curdev != NULL; curdev = deviter_next(&di)) { if (device_parent(curdev) != dv) continue; - if (!pmf_device_resume(curdev PMF_FN_CALL) || - !pmf_device_descendants_resume(curdev PMF_FN_CALL)) { + if (!pmf_device_resume(curdev, qual) || + !pmf_device_descendants_resume(curdev, qual)) { rv = false; break; } @@ -855,24 +855,24 @@ pmf_device_descendants_resume(device_t dv PMF_FN_ARGS) } bool -pmf_device_subtree_release(device_t dv PMF_FN_ARGS) +pmf_device_subtree_release(device_t dv, pmf_qual_t qual) { struct pmf_qual pq; - device_pmf_remove_suspensor(dv PMF_FN_CALL); + device_pmf_remove_suspensor(dv, qual); return pmf_device_descendants_release(dv, &pq); } bool -pmf_device_subtree_resume(device_t dv PMF_FN_ARGS) +pmf_device_subtree_resume(device_t dv, pmf_qual_t qual) { struct pmf_qual pq; - if (!pmf_device_subtree_release(dv PMF_FN_CALL)) + if (!pmf_device_subtree_release(dv, qual)) return false; - if (!pmf_device_recursive_resume(dv PMF_FN_CALL)) + if (!pmf_device_recursive_resume(dv, qual)) return false; pmf_qual_recursive_copy(&pq, qual); @@ -883,7 +883,7 @@ pmf_device_subtree_resume(device_t dv PMF_FN_ARGS) #include static bool -pmf_class_network_suspend(device_t dev PMF_FN_ARGS) +pmf_class_network_suspend(device_t dev, pmf_qual_t qual) { struct ifnet *ifp = device_pmf_class_private(dev); int s; @@ -896,7 +896,7 @@ pmf_class_network_suspend(device_t dev PMF_FN_ARGS) } static bool -pmf_class_network_resume(device_t dev PMF_FN_ARGS) +pmf_class_network_resume(device_t dev, pmf_qual_t qual) { struct ifnet *ifp = device_pmf_class_private(dev); int s; diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index 1b5bb24c959..d5169092c65 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.193 2010/01/08 00:09:45 dyoung Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.194 2010/01/08 12:07:08 rmind Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.193 2010/01/08 00:09:45 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.194 2010/01/08 12:07:08 rmind Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -2099,15 +2099,15 @@ device_pmf_is_registered(device_t dev) } bool -device_pmf_driver_suspend(device_t dev PMF_FN_ARGS) +device_pmf_driver_suspend(device_t dev, pmf_qual_t qual) { if ((dev->dv_flags & DVF_DRIVER_SUSPENDED) != 0) return true; if ((dev->dv_flags & DVF_CLASS_SUSPENDED) == 0) return false; - if (pmf_qual_depth(PMF_FN_CALL1) <= DEVACT_LEVEL_DRIVER && + if (pmf_qual_depth(qual) <= DEVACT_LEVEL_DRIVER && dev->dv_driver_suspend != NULL && - !(*dev->dv_driver_suspend)(dev PMF_FN_CALL)) + !(*dev->dv_driver_suspend)(dev, qual)) return false; dev->dv_flags |= DVF_DRIVER_SUSPENDED; @@ -2115,15 +2115,15 @@ device_pmf_driver_suspend(device_t dev PMF_FN_ARGS) } bool -device_pmf_driver_resume(device_t dev PMF_FN_ARGS) +device_pmf_driver_resume(device_t dev, pmf_qual_t qual) { if ((dev->dv_flags & DVF_DRIVER_SUSPENDED) == 0) return true; if ((dev->dv_flags & DVF_BUS_SUSPENDED) != 0) return false; - if (pmf_qual_depth(PMF_FN_CALL1) <= DEVACT_LEVEL_DRIVER && + if (pmf_qual_depth(qual) <= DEVACT_LEVEL_DRIVER && dev->dv_driver_resume != NULL && - !(*dev->dv_driver_resume)(dev PMF_FN_CALL)) + !(*dev->dv_driver_resume)(dev, qual)) return false; dev->dv_flags &= ~DVF_DRIVER_SUSPENDED; @@ -2142,8 +2142,8 @@ device_pmf_driver_shutdown(device_t dev, int how) bool device_pmf_driver_register(device_t dev, - bool (*suspend)(device_t PMF_FN_PROTO), - bool (*resume)(device_t PMF_FN_PROTO), + bool (*suspend)(device_t, pmf_qual_t), + bool (*resume)(device_t, pmf_qual_t), bool (*shutdown)(device_t, int)) { dev->dv_driver_suspend = suspend; @@ -2280,16 +2280,16 @@ device_pmf_bus_private(device_t dev) } bool -device_pmf_bus_suspend(device_t dev PMF_FN_ARGS) +device_pmf_bus_suspend(device_t dev, pmf_qual_t qual) { if ((dev->dv_flags & DVF_BUS_SUSPENDED) != 0) return true; if ((dev->dv_flags & DVF_CLASS_SUSPENDED) == 0 || (dev->dv_flags & DVF_DRIVER_SUSPENDED) == 0) return false; - if (pmf_qual_depth(PMF_FN_CALL1) <= DEVACT_LEVEL_BUS && + if (pmf_qual_depth(qual) <= DEVACT_LEVEL_BUS && dev->dv_bus_suspend != NULL && - !(*dev->dv_bus_suspend)(dev PMF_FN_CALL)) + !(*dev->dv_bus_suspend)(dev, qual)) return false; dev->dv_flags |= DVF_BUS_SUSPENDED; @@ -2297,13 +2297,13 @@ device_pmf_bus_suspend(device_t dev PMF_FN_ARGS) } bool -device_pmf_bus_resume(device_t dev PMF_FN_ARGS) +device_pmf_bus_resume(device_t dev, pmf_qual_t qual) { if ((dev->dv_flags & DVF_BUS_SUSPENDED) == 0) return true; - if (pmf_qual_depth(PMF_FN_CALL1) <= DEVACT_LEVEL_BUS && + if (pmf_qual_depth(qual) <= DEVACT_LEVEL_BUS && dev->dv_bus_resume != NULL && - !(*dev->dv_bus_resume)(dev PMF_FN_CALL)) + !(*dev->dv_bus_resume)(dev, qual)) return false; dev->dv_flags &= ~DVF_BUS_SUSPENDED; @@ -2322,8 +2322,8 @@ device_pmf_bus_shutdown(device_t dev, int how) void device_pmf_bus_register(device_t dev, void *priv, - bool (*suspend)(device_t PMF_FN_PROTO), - bool (*resume)(device_t PMF_FN_PROTO), + bool (*suspend)(device_t, pmf_qual_t), + bool (*resume)(device_t, pmf_qual_t), bool (*shutdown)(device_t, int), void (*deregister)(device_t)) { dev->dv_bus_private = priv; @@ -2352,13 +2352,13 @@ device_pmf_class_private(device_t dev) } bool -device_pmf_class_suspend(device_t dev PMF_FN_ARGS) +device_pmf_class_suspend(device_t dev, pmf_qual_t qual) { if ((dev->dv_flags & DVF_CLASS_SUSPENDED) != 0) return true; - if (pmf_qual_depth(PMF_FN_CALL1) <= DEVACT_LEVEL_CLASS && + if (pmf_qual_depth(qual) <= DEVACT_LEVEL_CLASS && dev->dv_class_suspend != NULL && - !(*dev->dv_class_suspend)(dev PMF_FN_CALL)) + !(*dev->dv_class_suspend)(dev, qual)) return false; dev->dv_flags |= DVF_CLASS_SUSPENDED; @@ -2366,16 +2366,16 @@ device_pmf_class_suspend(device_t dev PMF_FN_ARGS) } bool -device_pmf_class_resume(device_t dev PMF_FN_ARGS) +device_pmf_class_resume(device_t dev, pmf_qual_t qual) { if ((dev->dv_flags & DVF_CLASS_SUSPENDED) == 0) return true; if ((dev->dv_flags & DVF_BUS_SUSPENDED) != 0 || (dev->dv_flags & DVF_DRIVER_SUSPENDED) != 0) return false; - if (pmf_qual_depth(PMF_FN_CALL1) <= DEVACT_LEVEL_CLASS && + if (pmf_qual_depth(qual) <= DEVACT_LEVEL_CLASS && dev->dv_class_resume != NULL && - !(*dev->dv_class_resume)(dev PMF_FN_CALL)) + !(*dev->dv_class_resume)(dev, qual)) return false; dev->dv_flags &= ~DVF_CLASS_SUSPENDED; @@ -2384,8 +2384,8 @@ device_pmf_class_resume(device_t dev PMF_FN_ARGS) void device_pmf_class_register(device_t dev, void *priv, - bool (*suspend)(device_t PMF_FN_PROTO), - bool (*resume)(device_t PMF_FN_PROTO), + bool (*suspend)(device_t, pmf_qual_t), + bool (*resume)(device_t, pmf_qual_t), void (*deregister)(device_t)) { dev->dv_class_private = priv; diff --git a/sys/rump/librump/rumpkern/emul.c b/sys/rump/librump/rumpkern/emul.c index cac2e34e81a..31f5419590c 100644 --- a/sys/rump/librump/rumpkern/emul.c +++ b/sys/rump/librump/rumpkern/emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.113 2009/12/16 20:57:15 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.114 2009/12/25 01:56:43 elad Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.113 2009/12/16 20:57:15 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.114 2009/12/25 01:56:43 elad Exp $"); #include #include @@ -453,8 +453,8 @@ cpu_reboot(int howto, char *bootstr) bool pmf_device_register1(struct device *dev, - bool (*suspend)(device_t PMF_FN_PROTO), - bool (*resume)(device_t PMF_FN_PROTO), + bool (*suspend)(device_t, pmf_qual_t), + bool (*resume)(device_t, pmf_qual_t), bool (*shutdown)(device_t, int)) { diff --git a/sys/sys/device.h b/sys/sys/device.h index ff705583502..0526a07fbe2 100644 --- a/sys/sys/device.h +++ b/sys/sys/device.h @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.129 2010/01/07 22:39:52 dyoung Exp $ */ +/* $NetBSD: device.h,v 1.130 2010/01/08 00:09:45 dyoung Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -158,20 +158,20 @@ struct device { size_t dv_activity_count; void (**dv_activity_handlers)(device_t, devactive_t); - bool (*dv_driver_suspend)(device_t PMF_FN_PROTO); - bool (*dv_driver_resume)(device_t PMF_FN_PROTO); + bool (*dv_driver_suspend)(device_t, pmf_qual_t); + bool (*dv_driver_resume)(device_t, pmf_qual_t); bool (*dv_driver_shutdown)(device_t, int); bool (*dv_driver_child_register)(device_t); void *dv_bus_private; - bool (*dv_bus_suspend)(device_t PMF_FN_PROTO); - bool (*dv_bus_resume)(device_t PMF_FN_PROTO); + bool (*dv_bus_suspend)(device_t, pmf_qual_t); + bool (*dv_bus_resume)(device_t, pmf_qual_t); bool (*dv_bus_shutdown)(device_t, int); void (*dv_bus_deregister)(device_t); void *dv_class_private; - bool (*dv_class_suspend)(device_t PMF_FN_PROTO); - bool (*dv_class_resume)(device_t PMF_FN_PROTO); + bool (*dv_class_suspend)(device_t, pmf_qual_t); + bool (*dv_class_resume)(device_t, pmf_qual_t); void (*dv_class_deregister)(device_t); devgen_t dv_add_gen, @@ -522,13 +522,13 @@ device_t device_find_by_driver_unit(const char *, int); bool device_pmf_is_registered(device_t); -bool device_pmf_driver_suspend(device_t PMF_FN_PROTO); -bool device_pmf_driver_resume(device_t PMF_FN_PROTO); +bool device_pmf_driver_suspend(device_t, pmf_qual_t); +bool device_pmf_driver_resume(device_t, pmf_qual_t); bool device_pmf_driver_shutdown(device_t, int); bool device_pmf_driver_register(device_t, - bool (*)(device_t PMF_FN_PROTO), - bool (*)(device_t PMF_FN_PROTO), + bool (*)(device_t, pmf_qual_t), + bool (*)(device_t, pmf_qual_t), bool (*)(device_t, int)); void device_pmf_driver_deregister(device_t); @@ -537,8 +537,8 @@ void device_pmf_driver_set_child_register(device_t, bool (*)(device_t)); void *device_pmf_bus_private(device_t); -bool device_pmf_bus_suspend(device_t PMF_FN_PROTO); -bool device_pmf_bus_resume(device_t PMF_FN_PROTO); +bool device_pmf_bus_suspend(device_t, pmf_qual_t); +bool device_pmf_bus_resume(device_t, pmf_qual_t); bool device_pmf_bus_shutdown(device_t, int); device_lock_t device_getlock(device_t); @@ -546,24 +546,24 @@ void device_pmf_unlock(device_t); bool device_pmf_lock(device_t); bool device_is_self_suspended(device_t); -void device_pmf_self_suspend(device_t PMF_FN_PROTO); -void device_pmf_self_resume(device_t PMF_FN_PROTO); -bool device_pmf_self_wait(device_t PMF_FN_PROTO); +void device_pmf_self_suspend(device_t, pmf_qual_t); +void device_pmf_self_resume(device_t, pmf_qual_t); +bool device_pmf_self_wait(device_t, pmf_qual_t); void device_pmf_bus_register(device_t, void *, - bool (*)(device_t PMF_FN_PROTO), - bool (*)(device_t PMF_FN_PROTO), + bool (*)(device_t, pmf_qual_t), + bool (*)(device_t, pmf_qual_t), bool (*)(device_t, int), void (*)(device_t)); void device_pmf_bus_deregister(device_t); void *device_pmf_class_private(device_t); -bool device_pmf_class_suspend(device_t PMF_FN_PROTO); -bool device_pmf_class_resume(device_t PMF_FN_PROTO); +bool device_pmf_class_suspend(device_t, pmf_qual_t); +bool device_pmf_class_resume(device_t, pmf_qual_t); void device_pmf_class_register(device_t, void *, - bool (*)(device_t PMF_FN_PROTO), - bool (*)(device_t PMF_FN_PROTO), + bool (*)(device_t, pmf_qual_t), + bool (*)(device_t, pmf_qual_t), void (*)(device_t)); void device_pmf_class_deregister(device_t); diff --git a/sys/sys/pmf.h b/sys/sys/pmf.h index 997e1a20ffc..3194b09648b 100644 --- a/sys/sys/pmf.h +++ b/sys/sys/pmf.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmf.h,v 1.15 2009/04/02 00:09:34 dyoung Exp $ */ +/* $NetBSD: pmf.h,v 1.16 2009/09/16 16:34:56 dyoung Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -64,16 +64,6 @@ extern const struct device_suspensor * const device_suspensor_system, * const device_suspensor_drvctl; -#define PMF_FN_PROTO1 pmf_qual_t -#define PMF_FN_ARGS1 pmf_qual_t qual -#define PMF_FN_CALL1 qual - -#define PMF_FN_PROTO , pmf_qual_t -#define PMF_FN_ARGS , pmf_qual_t qual -#define PMF_FN_CALL , qual - -#define PMF_FLAGS_FMT "%x" /* "n/a" */ - void pmf_init(void); bool pmf_event_inject(device_t, pmf_generic_event_t); @@ -85,30 +75,30 @@ void pmf_event_deregister(device_t, pmf_generic_event_t, bool pmf_set_platform(const char *, const char *); const char *pmf_get_platform(const char *); -bool pmf_system_resume(PMF_FN_PROTO1); -bool pmf_system_bus_resume(PMF_FN_PROTO1); -bool pmf_system_suspend(PMF_FN_PROTO1); +bool pmf_system_resume(pmf_qual_t); +bool pmf_system_bus_resume(pmf_qual_t); +bool pmf_system_suspend(pmf_qual_t); void pmf_system_shutdown(int); bool pmf_device_register1(device_t, - bool (*)(device_t PMF_FN_PROTO), - bool (*)(device_t PMF_FN_PROTO), + bool (*)(device_t, pmf_qual_t), + bool (*)(device_t, pmf_qual_t), bool (*)(device_t, int)); /* compatibility */ #define pmf_device_register(__d, __s, __r) \ pmf_device_register1((__d), (__s), (__r), NULL) void pmf_device_deregister(device_t); -bool pmf_device_suspend(device_t PMF_FN_PROTO); -bool pmf_device_resume(device_t PMF_FN_PROTO); +bool pmf_device_suspend(device_t, pmf_qual_t); +bool pmf_device_resume(device_t, pmf_qual_t); -bool pmf_device_recursive_suspend(device_t PMF_FN_PROTO); -bool pmf_device_recursive_resume(device_t PMF_FN_PROTO); -bool pmf_device_descendants_resume(device_t PMF_FN_PROTO); -bool pmf_device_subtree_resume(device_t PMF_FN_PROTO); +bool pmf_device_recursive_suspend(device_t, pmf_qual_t); +bool pmf_device_recursive_resume(device_t, pmf_qual_t); +bool pmf_device_descendants_resume(device_t, pmf_qual_t); +bool pmf_device_subtree_resume(device_t, pmf_qual_t); -bool pmf_device_descendants_release(device_t PMF_FN_PROTO); -bool pmf_device_subtree_release(device_t PMF_FN_PROTO); +bool pmf_device_descendants_release(device_t, pmf_qual_t); +bool pmf_device_subtree_release(device_t, pmf_qual_t); struct ifnet; void pmf_class_network_register(device_t, struct ifnet *); -- 2.11.4.GIT