Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch c99 struct initializers
details: https://anonhg.NetBSD.org/src/rev/da0b697d5933
branches: trunk
changeset: 977672:da0b697d5933
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 30 22:20:38 2020 +0000
description:
c99 struct initializers
diffstat:
sys/arch/arm/xscale/pxa2x0_apm.c | 10 +++++++---
sys/arch/macppc/dev/apm.c | 12 ++++++++----
sys/arch/mips/ralink/ralink_gpio.c | 12 ++++++------
3 files changed, 21 insertions(+), 13 deletions(-)
diffs (90 lines):
diff -r 784215ffddb0 -r da0b697d5933 sys/arch/arm/xscale/pxa2x0_apm.c
--- a/sys/arch/arm/xscale/pxa2x0_apm.c Fri Oct 30 22:19:00 2020 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_apm.c Fri Oct 30 22:20:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pxa2x0_apm.c,v 1.4 2012/11/12 18:00:38 skrll Exp $ */
+/* $NetBSD: pxa2x0_apm.c,v 1.5 2020/10/30 22:20:38 christos Exp $ */
/* $OpenBSD: pxa2x0_apm.c,v 1.28 2007/03/29 18:42:38 uwe Exp $ */
/*-
@@ -104,8 +104,12 @@
int filt_apmread(struct knote *kn, long hint);
int apmkqfilter(dev_t dev, struct knote *kn);
-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,
+};
#endif
/*
diff -r 784215ffddb0 -r da0b697d5933 sys/arch/macppc/dev/apm.c
--- a/sys/arch/macppc/dev/apm.c Fri Oct 30 22:19:00 2020 +0000
+++ b/sys/arch/macppc/dev/apm.c Fri Oct 30 22:20:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apm.c,v 1.27 2014/07/25 08:10:34 dholland Exp $ */
+/* $NetBSD: apm.c,v 1.28 2020/10/30 22:20:38 christos Exp $ */
/* $OpenBSD: apm.c,v 1.5 2002/06/07 07:13:59 miod Exp $ */
/*-
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.27 2014/07/25 08:10:34 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.28 2020/10/30 22:20:38 christos Exp $");
#include "apm.h"
@@ -431,8 +431,12 @@
return (kn->kn_data > 0);
}
-static struct filterops apmread_filtops =
- { 1, NULL, filt_apmrdetach, filt_apmread};
+static 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 -r 784215ffddb0 -r da0b697d5933 sys/arch/mips/ralink/ralink_gpio.c
--- a/sys/arch/mips/ralink/ralink_gpio.c Fri Oct 30 22:19:00 2020 +0000
+++ b/sys/arch/mips/ralink/ralink_gpio.c Fri Oct 30 22:20:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ralink_gpio.c,v 1.8 2020/03/10 11:07:39 martin Exp $ */
+/* $NetBSD: ralink_gpio.c,v 1.9 2020/10/30 22:20:38 christos Exp $ */
/*-
* Copyright (c) 2011 CradlePoint Technology, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
/* ra_gpio.c -- Ralink 3052 gpio driver */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.8 2020/03/10 11:07:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.9 2020/10/30 22:20:38 christos Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -495,10 +495,10 @@
static struct klist knotes;
static int app_filter_id;
static struct filterops app_fops = {
- 0,
- gpio_event_app_user_attach,
- gpio_event_app_user_detach,
- gpio_event_app_user_event
+ .f_isfd = 0,
+ .f_attach = gpio_event_app_user_attach,
+ .f_detach = gpio_event_app_user_detach,
+ .f_event = gpio_event_app_user_event,
};
static struct callout led_tick_callout;
static int gpio_driver_blink_leds = 1;
Home |
Main Index |
Thread Index |
Old Index