summaryrefslogtreecommitdiff
path: root/sys/dev/sysmon
diff options
context:
space:
mode:
authormaya <maya@NetBSD.org>2017-10-25 08:12:37 +0000
committermaya <maya@NetBSD.org>2017-10-25 08:12:37 +0000
commit4aa34cd6ca3cea8b38afc3778c72693e1c6089dc (patch)
tree8735a8ea01531df3a5150074a688e92467f9dcd1 /sys/dev/sysmon
parent3a28b8238263bbcdcffd68f8cb1c35b752a059c7 (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/sysmon')
-rw-r--r--sys/dev/sysmon/sysmon_power.c20
1 files changed, 14 insertions, 6 deletions
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: