diff options
| author | maya <maya@NetBSD.org> | 2017-10-25 08:12:37 +0000 |
|---|---|---|
| committer | maya <maya@NetBSD.org> | 2017-10-25 08:12:37 +0000 |
| commit | 4aa34cd6ca3cea8b38afc3778c72693e1c6089dc (patch) | |
| tree | 8735a8ea01531df3a5150074a688e92467f9dcd1 /sys/dev | |
| parent | 3a28b8238263bbcdcffd68f8cb1c35b752a059c7 (diff) | |
Use C99 initializer for filterops
Mostly done with spatch with touchups for indentation
@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/apm/apm.c | 12 | ||||
| -rw-r--r-- | sys/dev/audio.c | 20 | ||||
| -rw-r--r-- | sys/dev/hpc/apm/apmdev.c | 12 | ||||
| -rw-r--r-- | sys/dev/ir/irframe_tty.c | 21 | ||||
| -rw-r--r-- | sys/dev/isa/satlink.c | 20 | ||||
| -rw-r--r-- | sys/dev/midi.c | 20 | ||||
| -rw-r--r-- | sys/dev/pci/oboe.c | 21 | ||||
| -rw-r--r-- | sys/dev/putter/putter.c | 12 | ||||
| -rw-r--r-- | sys/dev/qbus/qd.c | 20 | ||||
| -rw-r--r-- | sys/dev/sbus/bpp.c | 20 | ||||
| -rw-r--r-- | sys/dev/scsipi/ch.c | 20 | ||||
| -rw-r--r-- | sys/dev/sequencer.c | 20 | ||||
| -rw-r--r-- | sys/dev/sun/event.c | 12 | ||||
| -rw-r--r-- | sys/dev/sysmon/sysmon_power.c | 20 | ||||
| -rw-r--r-- | sys/dev/usb/udsir.c | 21 | ||||
| -rw-r--r-- | sys/dev/usb/ugen.c | 36 | ||||
| -rw-r--r-- | sys/dev/usb/uhid.c | 20 | ||||
| -rw-r--r-- | sys/dev/usb/uirda.c | 21 | ||||
| -rw-r--r-- | sys/dev/usb/usb.c | 12 | ||||
| -rw-r--r-- | sys/dev/usb/uscanner.c | 12 | ||||
| -rw-r--r-- | sys/dev/usb/ustir.c | 21 | ||||
| -rw-r--r-- | sys/dev/wscons/wsevent.c | 12 |
22 files changed, 283 insertions, 122 deletions
diff --git a/sys/dev/apm/apm.c b/sys/dev/apm/apm.c index ad54c2a1142..f365fd452c3 100644 --- a/sys/dev/apm/apm.c +++ b/sys/dev/apm/apm.c @@ -1,4 +1,4 @@ -/* $NetBSD: apm.c,v 1.31 2014/07/25 08:10:36 dholland Exp $ */ +/* $NetBSD: apm.c,v 1.32 2017/10/25 08:12:38 maya Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.31 2014/07/25 08:10:36 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.32 2017/10/25 08:12:38 maya Exp $"); #include "opt_apm.h" @@ -883,8 +883,12 @@ filt_apmread(struct knote *kn, long hint) return (kn->kn_data > 0); } -static const struct filterops apmread_filtops = - { 1, NULL, filt_apmrdetach, filt_apmread }; +static const struct filterops apmread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_apmrdetach, + .f_event = filt_apmread, +}; int apmkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 842d5cad126..53ad5810444 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.413 2017/10/21 09:58:56 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.414 2017/10/25 08:12:38 maya Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss <nathanialsloss@yahoo.com.au> @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.413 2017/10/21 09:58:56 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.414 2017/10/25 08:12:38 maya Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -3260,8 +3260,12 @@ filt_audioread(struct knote *kn, long hint) return kn->kn_data > 0; } -static const struct filterops audioread_filtops = - { 1, NULL, filt_audiordetach, filt_audioread }; +static const struct filterops audioread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_audiordetach, + .f_event = filt_audioread, +}; static void filt_audiowdetach(struct knote *kn) @@ -3305,8 +3309,12 @@ filt_audiowrite(struct knote *kn, long hint) return kn->kn_data > 0; } -static const struct filterops audiowrite_filtops = - { 1, NULL, filt_audiowdetach, filt_audiowrite }; +static const struct filterops audiowrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_audiowdetach, + .f_event = filt_audiowrite, +}; int audio_kqfilter(struct audio_chan *chan, struct knote *kn) diff --git a/sys/dev/hpc/apm/apmdev.c b/sys/dev/hpc/apm/apmdev.c index 00331fa032f..964a0d47567 100644 --- a/sys/dev/hpc/apm/apmdev.c +++ b/sys/dev/hpc/apm/apmdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: apmdev.c,v 1.30 2014/07/25 08:10:37 dholland Exp $ */ +/* $NetBSD: apmdev.c,v 1.31 2017/10/25 08:12:38 maya Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.30 2014/07/25 08:10:37 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.31 2017/10/25 08:12:38 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_apm.h" @@ -925,8 +925,12 @@ filt_apmread(struct knote *kn, long hint) return (kn->kn_data > 0); } -static const struct filterops apmread_filtops = - { 1, NULL, filt_apmrdetach, filt_apmread }; +static const struct filterops apmread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_apmrdetach, + .f_event = filt_apmread, +}; int apmdevkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/ir/irframe_tty.c b/sys/dev/ir/irframe_tty.c index bc9e14c98dd..0c3d8a3b811 100644 --- a/sys/dev/ir/irframe_tty.c +++ b/sys/dev/ir/irframe_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: irframe_tty.c,v 1.61 2015/08/20 14:40:18 christos Exp $ */ +/* $NetBSD: irframe_tty.c,v 1.62 2017/10/25 08:12:38 maya Exp $ */ /* * TODO @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.61 2015/08/20 14:40:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.62 2017/10/25 08:12:38 maya Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -823,10 +823,19 @@ filt_irframetwrite(struct knote *kn, long hint) return (0); } -static const struct filterops irframetread_filtops = - { 1, NULL, filt_irframetrdetach, filt_irframetread }; -static const struct filterops irframetwrite_filtops = - { 1, NULL, filt_irframetwdetach, filt_irframetwrite }; +static const struct filterops irframetread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_irframetrdetach, + .f_event = filt_irframetread, +}; + +static const struct filterops irframetwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_irframetwdetach, + .f_event = filt_irframetwrite, +}; int irframet_kqfilter(void *h, struct knote *kn) diff --git a/sys/dev/isa/satlink.c b/sys/dev/isa/satlink.c index a4a15d1e995..1b27c3797c6 100644 --- a/sys/dev/isa/satlink.c +++ b/sys/dev/isa/satlink.c @@ -1,4 +1,4 @@ -/* $NetBSD: satlink.c,v 1.45 2014/07/25 08:10:37 dholland Exp $ */ +/* $NetBSD: satlink.c,v 1.46 2017/10/25 08:12:38 maya Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: satlink.c,v 1.45 2014/07/25 08:10:37 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: satlink.c,v 1.46 2017/10/25 08:12:38 maya Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -456,11 +456,19 @@ filt_satlinkread(struct knote *kn, long hint) return (1); } -static const struct filterops satlinkread_filtops = - { 1, NULL, filt_satlinkrdetach, filt_satlinkread }; +static const struct filterops satlinkread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_satlinkrdetach, + .f_event = filt_satlinkread, +}; -static const struct filterops satlink_seltrue_filtops = - { 1, NULL, filt_satlinkrdetach, filt_seltrue }; +static const struct filterops satlink_seltrue_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_satlinkrdetach, + .f_event = filt_seltrue, +}; int satlinkkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/midi.c b/sys/dev/midi.c index 9c3591374ac..a001e8c585f 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.86 2017/06/01 09:44:30 pgoyette Exp $ */ +/* $NetBSD: midi.c,v 1.87 2017/10/25 08:12:38 maya Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.86 2017/06/01 09:44:30 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.87 2017/10/25 08:12:38 maya Exp $"); #ifdef _KERNEL_OPT #include "midi.h" @@ -1763,8 +1763,12 @@ filt_midiread(struct knote *kn, long hint) return (kn->kn_data > 0); } -static const struct filterops midiread_filtops = - { 1, NULL, filt_midirdetach, filt_midiread }; +static const struct filterops midiread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_midirdetach, + .f_event = filt_midiread, +}; static void filt_midiwdetach(struct knote *kn) @@ -1807,8 +1811,12 @@ filt_midiwrite(struct knote *kn, long hint) return (kn->kn_data > 0); } -static const struct filterops midiwrite_filtops = - { 1, NULL, filt_midiwdetach, filt_midiwrite }; +static const struct filterops midiwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_midiwdetach, + .f_event = filt_midiwrite, +}; int midikqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/pci/oboe.c b/sys/dev/pci/oboe.c index e78f4ccee36..a6a1593f7c7 100644 --- a/sys/dev/pci/oboe.c +++ b/sys/dev/pci/oboe.c @@ -1,4 +1,4 @@ -/* $NetBSD: oboe.c,v 1.44 2017/08/20 10:55:37 maxv Exp $ */ +/* $NetBSD: oboe.c,v 1.45 2017/10/25 08:12:38 maya Exp $ */ /* XXXXFVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage */ @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.44 2017/08/20 10:55:37 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.45 2017/10/25 08:12:38 maya Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -493,10 +493,19 @@ filt_oboewdetach(struct knote *kn) splx(s); } -static const struct filterops oboeread_filtops = - { 1, NULL, filt_oboerdetach, filt_oboeread }; -static const struct filterops oboewrite_filtops = - { 1, NULL, filt_oboewdetach, filt_seltrue }; +static const struct filterops oboeread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_oboerdetach, + .f_event = filt_oboeread, +}; + +static const struct filterops oboewrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_oboewdetach, + .f_event = filt_seltrue, +}; static int oboe_kqfilter(void *h, struct knote *kn) diff --git a/sys/dev/putter/putter.c b/sys/dev/putter/putter.c index cd2132e38d0..84b1d81012c 100644 --- a/sys/dev/putter/putter.c +++ b/sys/dev/putter/putter.c @@ -1,4 +1,4 @@ -/* $NetBSD: putter.c,v 1.35 2014/07/25 08:10:38 dholland Exp $ */ +/* $NetBSD: putter.c,v 1.36 2017/10/25 08:12:38 maya Exp $ */ /* * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.35 2014/07/25 08:10:38 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.36 2017/10/25 08:12:38 maya Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -490,8 +490,12 @@ filt_putter(struct knote *kn, long hint) return rv; } -static const struct filterops putter_filtops = - { 1, NULL, filt_putterdetach, filt_putter }; +static const struct filterops putter_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_putterdetach, + .f_event = filt_putter, +}; static int putter_fop_kqfilter(file_t *fp, struct knote *kn) diff --git a/sys/dev/qbus/qd.c b/sys/dev/qbus/qd.c index c27b30a1e77..9a36533adf9 100644 --- a/sys/dev/qbus/qd.c +++ b/sys/dev/qbus/qd.c @@ -1,4 +1,4 @@ -/* $NetBSD: qd.c,v 1.56 2014/10/18 08:33:28 snj Exp $ */ +/* $NetBSD: qd.c,v 1.57 2017/10/25 08:12:38 maya Exp $ */ /*- * Copyright (c) 1988 Regents of the University of California. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.56 2014/10/18 08:33:28 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.57 2017/10/25 08:12:38 maya Exp $"); #include "opt_ddb.h" @@ -1580,11 +1580,19 @@ filt_qdwrite(struct knote *kn, long hint) return (1); } -static const struct filterops qdread_filtops = - { 1, NULL, filt_qdrdetach, filt_qdread }; +static const struct filterops qdread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_qdrdetach, + .f_event = filt_qdread, +}; -static const struct filterops qdwrite_filtops = - { 1, NULL, filt_qdrdetach, filt_qdwrite }; +static const struct filterops qdwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_qdrdetach, + .f_event = filt_qdwrite, +}; int qdkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/sbus/bpp.c b/sys/dev/sbus/bpp.c index 634ae158a68..31b72f13055 100644 --- a/sys/dev/sbus/bpp.c +++ b/sys/dev/sbus/bpp.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpp.c,v 1.41 2014/07/25 08:10:38 dholland Exp $ */ +/* $NetBSD: bpp.c,v 1.42 2017/10/25 08:12:38 maya Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.41 2014/07/25 08:10:38 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.42 2017/10/25 08:12:38 maya Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -520,8 +520,12 @@ filt_bppread(struct knote *kn, long hint) return 0; } -static const struct filterops bppread_filtops = - { 1, NULL, filt_bpprdetach, filt_bppread }; +static const struct filterops bppread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_bpprdetach, + .f_event = filt_bppread, +}; static void filt_bppwdetach(struct knote *kn) @@ -546,8 +550,12 @@ filt_bpfwrite(struct knote *kn, long hint) return 1; } -static const struct filterops bppwrite_filtops = - { 1, NULL, filt_bppwdetach, filt_bpfwrite }; +static const struct filterops bppwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_bppwdetach, + .f_event = filt_bpfwrite, +}; int bppkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/scsipi/ch.c b/sys/dev/scsipi/ch.c index dcc8ae9731a..208aa77e288 100644 --- a/sys/dev/scsipi/ch.c +++ b/sys/dev/scsipi/ch.c @@ -1,4 +1,4 @@ -/* $NetBSD: ch.c,v 1.91 2016/11/20 15:37:19 mlelstv Exp $ */ +/* $NetBSD: ch.c,v 1.92 2017/10/25 08:12:39 maya Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.91 2016/11/20 15:37:19 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.92 2017/10/25 08:12:39 maya Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -487,11 +487,19 @@ filt_chread(struct knote *kn, long hint) return (1); } -static const struct filterops chread_filtops = - { 1, NULL, filt_chdetach, filt_chread }; +static const struct filterops chread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_chdetach, + .f_event = filt_chread, +}; -static const struct filterops chwrite_filtops = - { 1, NULL, filt_chdetach, filt_seltrue }; +static const struct filterops chwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_chdetach, + .f_event = filt_seltrue, +}; static int chkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index 2e673e262be..5ec87fe0065 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.66 2017/06/01 09:44:30 pgoyette Exp $ */ +/* $NetBSD: sequencer.c,v 1.67 2017/10/25 08:12:38 maya Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.66 2017/06/01 09:44:30 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.67 2017/10/25 08:12:38 maya Exp $"); #ifdef _KERNEL_OPT #include "sequencer.h" @@ -912,8 +912,12 @@ filt_sequencerread(struct knote *kn, long hint) return rv; } -static const struct filterops sequencerread_filtops = - { 1, NULL, filt_sequencerrdetach, filt_sequencerread }; +static const struct filterops sequencerread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_sequencerrdetach, + .f_event = filt_sequencerread, +}; static void filt_sequencerwdetach(struct knote *kn) @@ -946,8 +950,12 @@ filt_sequencerwrite(struct knote *kn, long hint) return rv; } -static const struct filterops sequencerwrite_filtops = - { 1, NULL, filt_sequencerwdetach, filt_sequencerwrite }; +static const struct filterops sequencerwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_sequencerwdetach, + .f_event = filt_sequencerwrite, +}; static int sequencerkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/sun/event.c b/sys/dev/sun/event.c index 4cd4934f122..60504f9cc92 100644 --- a/sys/dev/sun/event.c +++ b/sys/dev/sun/event.c @@ -1,4 +1,4 @@ -/* $NetBSD: event.c,v 1.23 2009/03/14 15:36:21 dsl Exp $ */ +/* $NetBSD: event.c,v 1.24 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.23 2009/03/14 15:36:21 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.24 2017/10/25 08:12:39 maya Exp $"); #include <sys/param.h> #include <sys/fcntl.h> @@ -196,8 +196,12 @@ filt_evread(struct knote *kn, long hint) return (1); } -static const struct filterops ev_filtops = - { 1, NULL, filt_evrdetach, filt_evread }; +static const struct filterops ev_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_evrdetach, + .f_event = filt_evread, +}; int ev_kqfilter(struct evvar *ev, struct knote *kn) diff --git a/sys/dev/sysmon/sysmon_power.c b/sys/dev/sysmon/sysmon_power.c index 4d9f4fe6de2..7872d425d45 100644 --- a/sys/dev/sysmon/sysmon_power.c +++ b/sys/dev/sysmon/sysmon_power.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_power.c,v 1.57 2015/12/14 01:08:47 pgoyette Exp $ */ +/* $NetBSD: sysmon_power.c,v 1.58 2017/10/25 08:12:39 maya Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.57 2015/12/14 01:08:47 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.58 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -557,11 +557,19 @@ filt_sysmon_power_read(struct knote *kn, long hint) return kn->kn_data > 0; } -static const struct filterops sysmon_power_read_filtops = - { 1, NULL, filt_sysmon_power_rdetach, filt_sysmon_power_read }; +static const struct filterops sysmon_power_read_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_sysmon_power_rdetach, + .f_event = filt_sysmon_power_read, +}; -static const struct filterops sysmon_power_write_filtops = - { 1, NULL, filt_sysmon_power_rdetach, filt_seltrue }; +static const struct filterops sysmon_power_write_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_sysmon_power_rdetach, + .f_event = filt_seltrue, +}; /* * sysmonkqfilter_power: diff --git a/sys/dev/usb/udsir.c b/sys/dev/usb/udsir.c index a38075ced99..66abcdda809 100644 --- a/sys/dev/usb/udsir.c +++ b/sys/dev/usb/udsir.c @@ -1,4 +1,4 @@ -/* $NetBSD: udsir.c,v 1.4 2017/06/01 02:45:12 chs Exp $ */ +/* $NetBSD: udsir.c,v 1.5 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udsir.c,v 1.4 2017/06/01 02:45:12 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udsir.c,v 1.5 2017/10/25 08:12:39 maya Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -662,10 +662,19 @@ udsir_poll(void *h, int events, struct lwp *l) return revents; } -static const struct filterops udsirread_filtops = - { 1, NULL, filt_udsirrdetach, filt_udsirread }; -static const struct filterops udsirwrite_filtops = - { 1, NULL, filt_udsirwdetach, filt_udsirwrite }; +static const struct filterops udsirread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_udsirrdetach, + .f_event = filt_udsirread, +}; + +static const struct filterops udsirwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_udsirwdetach, + .f_event = filt_udsirwrite, +}; static int udsir_kqfilter(void *h, struct knote *kn) diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index e64e7233738..be92dbe1c83 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $NetBSD: ugen.c,v 1.135 2017/09/05 05:03:02 mrg Exp $ */ +/* $NetBSD: ugen.c,v 1.136 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.135 2017/09/05 05:03:02 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.136 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -2025,17 +2025,33 @@ filt_ugenwrite_bulk(struct knote *kn, long hint) return 1; } -static const struct filterops ugenread_intr_filtops = - { 1, NULL, filt_ugenrdetach, filt_ugenread_intr }; +static const struct filterops ugenread_intr_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_ugenrdetach, + .f_event = filt_ugenread_intr, +}; -static const struct filterops ugenread_isoc_filtops = - { 1, NULL, filt_ugenrdetach, filt_ugenread_isoc }; +static const struct filterops ugenread_isoc_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_ugenrdetach, + .f_event = filt_ugenread_isoc, +}; -static const struct filterops ugenread_bulk_filtops = - { 1, NULL, filt_ugenrdetach, filt_ugenread_bulk }; +static const struct filterops ugenread_bulk_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_ugenrdetach, + .f_event = filt_ugenread_bulk, +}; -static const struct filterops ugenwrite_bulk_filtops = - { 1, NULL, filt_ugenrdetach, filt_ugenwrite_bulk }; +static const struct filterops ugenwrite_bulk_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_ugenrdetach, + .f_event = filt_ugenwrite_bulk, +}; int ugenkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 497a0859556..8792ca224ca 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhid.c,v 1.99 2017/03/11 12:41:14 maya Exp $ */ +/* $NetBSD: uhid.c,v 1.100 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.99 2017/03/11 12:41:14 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.100 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -750,11 +750,19 @@ filt_uhidread(struct knote *kn, long hint) return kn->kn_data > 0; } -static const struct filterops uhidread_filtops = - { 1, NULL, filt_uhidrdetach, filt_uhidread }; +static const struct filterops uhidread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_uhidrdetach, + .f_event = filt_uhidread, +}; -static const struct filterops uhid_seltrue_filtops = - { 1, NULL, filt_uhidrdetach, filt_seltrue }; +static const struct filterops uhid_seltrue_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_uhidrdetach, + .f_event = filt_seltrue, +}; int uhidkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/usb/uirda.c b/sys/dev/usb/uirda.c index 96744d8fd88..8e3ef6a0b5b 100644 --- a/sys/dev/usb/uirda.c +++ b/sys/dev/usb/uirda.c @@ -1,4 +1,4 @@ -/* $NetBSD: uirda.c,v 1.41 2016/11/25 12:56:29 skrll Exp $ */ +/* $NetBSD: uirda.c,v 1.42 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.41 2016/11/25 12:56:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.42 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -640,10 +640,19 @@ filt_uirdawdetach(struct knote *kn) splx(s); } -static const struct filterops uirdaread_filtops = - { 1, NULL, filt_uirdardetach, filt_uirdaread }; -static const struct filterops uirdawrite_filtops = - { 1, NULL, filt_uirdawdetach, filt_seltrue }; +static const struct filterops uirdaread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_uirdardetach, + .f_event = filt_uirdaread, +}; + +static const struct filterops uirdawrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_uirdawdetach, + .f_event = filt_seltrue, +}; int uirda_kqfilter(void *h, struct knote *kn) diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 071ea842b2c..6f62c976c19 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.166 2017/09/01 15:19:59 skrll Exp $ */ +/* $NetBSD: usb.c,v 1.167 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.166 2017/09/01 15:19:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.167 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -875,8 +875,12 @@ filt_usbread(struct knote *kn, long hint) return 1; } -static const struct filterops usbread_filtops = - { 1, NULL, filt_usbrdetach, filt_usbread }; +static const struct filterops usbread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_usbrdetach, + .f_event = filt_usbread, +}; int usbkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 60ab1d377c3..d8a891243b1 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -1,4 +1,4 @@ -/* $NetBSD: uscanner.c,v 1.80 2016/12/04 10:12:35 skrll Exp $ */ +/* $NetBSD: uscanner.c,v 1.81 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.80 2016/12/04 10:12:35 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.81 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -676,8 +676,12 @@ filt_uscannerdetach(struct knote *kn) SLIST_REMOVE(&sc->sc_selq.sel_klist, kn, knote, kn_selnext); } -static const struct filterops uscanner_seltrue_filtops = - { 1, NULL, filt_uscannerdetach, filt_seltrue }; +static const struct filterops uscanner_seltrue_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_uscannerdetach, + .f_event = filt_seltrue, +}; int uscannerkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/dev/usb/ustir.c b/sys/dev/usb/ustir.c index 6eaa9961beb..067a06baa1c 100644 --- a/sys/dev/usb/ustir.c +++ b/sys/dev/usb/ustir.c @@ -1,4 +1,4 @@ -/* $NetBSD: ustir.c,v 1.37 2017/06/01 02:45:12 chs Exp $ */ +/* $NetBSD: ustir.c,v 1.38 2017/10/25 08:12:39 maya Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.37 2017/06/01 02:45:12 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.38 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1087,10 +1087,19 @@ filt_ustirwrite(struct knote *kn, long hint) return sc->sc_direction != udir_input; } -static const struct filterops ustirread_filtops = - { 1, NULL, filt_ustirrdetach, filt_ustirread }; -static const struct filterops ustirwrite_filtops = - { 1, NULL, filt_ustirwdetach, filt_ustirwrite }; +static const struct filterops ustirread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_ustirrdetach, + .f_event = filt_ustirread, +}; + +static const struct filterops ustirwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_ustirwdetach, + .f_event = filt_ustirwrite, +}; Static int ustir_kqfilter(void *h, struct knote *kn) diff --git a/sys/dev/wscons/wsevent.c b/sys/dev/wscons/wsevent.c index 2966dc40942..30c6ac2233f 100644 --- a/sys/dev/wscons/wsevent.c +++ b/sys/dev/wscons/wsevent.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsevent.c,v 1.36 2015/08/24 22:50:33 pooka Exp $ */ +/* $NetBSD: wsevent.c,v 1.37 2017/10/25 08:12:39 maya Exp $ */ /*- * Copyright (c) 2006, 2008 The NetBSD Foundation, Inc. @@ -104,7 +104,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsevent.c,v 1.36 2015/08/24 22:50:33 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsevent.c,v 1.37 2017/10/25 08:12:39 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -340,8 +340,12 @@ filt_wseventread(struct knote *kn, long hint) return (1); } -static const struct filterops wsevent_filtops = - { 1, NULL, filt_wseventrdetach, filt_wseventread }; +static const struct filterops wsevent_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_wseventrdetach, + .f_event = filt_wseventread, +}; int wsevent_kqfilter(struct wseventvar *ev, struct knote *kn) |
