Module Name: src Committed By: christos Date: Fri Oct 30 22:20:38 UTC 2020
Modified Files: src/sys/arch/arm/xscale: pxa2x0_apm.c src/sys/arch/macppc/dev: apm.c src/sys/arch/mips/ralink: ralink_gpio.c Log Message: c99 struct initializers To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/xscale/pxa2x0_apm.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/macppc/dev/apm.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/ralink/ralink_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/xscale/pxa2x0_apm.c diff -u src/sys/arch/arm/xscale/pxa2x0_apm.c:1.4 src/sys/arch/arm/xscale/pxa2x0_apm.c:1.5 --- src/sys/arch/arm/xscale/pxa2x0_apm.c:1.4 Mon Nov 12 13:00:38 2012 +++ src/sys/arch/arm/xscale/pxa2x0_apm.c Fri Oct 30 18:20:38 2020 @@ -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 @@ void filt_apmrdetach(struct knote *kn); 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 /* Index: src/sys/arch/macppc/dev/apm.c diff -u src/sys/arch/macppc/dev/apm.c:1.27 src/sys/arch/macppc/dev/apm.c:1.28 --- src/sys/arch/macppc/dev/apm.c:1.27 Fri Jul 25 04:10:34 2014 +++ src/sys/arch/macppc/dev/apm.c Fri Oct 30 18:20:38 2020 @@ -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 @@ filt_apmread(struct knote *kn, long hint 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) Index: src/sys/arch/mips/ralink/ralink_gpio.c diff -u src/sys/arch/mips/ralink/ralink_gpio.c:1.8 src/sys/arch/mips/ralink/ralink_gpio.c:1.9 --- src/sys/arch/mips/ralink/ralink_gpio.c:1.8 Tue Mar 10 07:07:39 2020 +++ src/sys/arch/mips/ralink/ralink_gpio.c Fri Oct 30 18:20:38 2020 @@ -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 int gpio_event_app_user_event(st 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;