c99 struct initializers

This commit is contained in:
christos 2020-10-30 22:20:38 +00:00
parent 0c5f517c54
commit 8ab41b6ec3
3 changed files with 21 additions and 13 deletions

View File

@ -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
/*

View File

@ -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)

View File

@ -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(struct knote *, long);
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;