diff options
author | phk <phk@FreeBSD.org> | 2003-03-03 12:15:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-03 12:15:54 +0000 |
commit | 0ae911eb0e57eebb61c50c02ddf69aa67ed19599 (patch) | |
tree | 4e91d5779ffebe1d75e975aa4450f35f965430eb /sys/dev/ofw | |
parent | e58d97a666e757e8429a219da05f88a51554c32c (diff) | |
download | FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.zip FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.tar.gz |
Gigacommit to improve device-driver source compatibility between
branches:
Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.
This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.
Approved by: re(scottl)
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r-- | sys/dev/ofw/ofw_console.c | 21 | ||||
-rw-r--r-- | sys/dev/ofw/openfirmio.c | 19 |
2 files changed, 13 insertions, 27 deletions
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 379a753..436dbc8 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -53,19 +53,14 @@ static d_ioctl_t ofw_dev_ioctl; #define CDEV_MAJOR 97 static struct cdevsw ofw_cdevsw = { - /* open */ ofw_dev_open, - /* close */ ofw_dev_close, - /* read */ ttyread, - /* write */ ttywrite, - /* ioctl */ ofw_dev_ioctl, - /* poll */ ttypoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "ofw", - /* major */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ 0, + .d_open = ofw_dev_open, + .d_close = ofw_dev_close, + .d_read = ttyread, + .d_write = ttywrite, + .d_ioctl = ofw_dev_ioctl, + .d_poll = ttypoll, + .d_name = "ofw", + .d_maj = CDEV_MAJOR, }; static struct tty *ofw_tp = NULL; diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c index 6f40619..c197eb8 100644 --- a/sys/dev/ofw/openfirmio.c +++ b/sys/dev/ofw/openfirmio.c @@ -66,20 +66,11 @@ static d_ioctl_t openfirm_ioctl; #define OPENFIRM_MINOR 0 static struct cdevsw openfirm_cdevsw = { - /* open */ nullopen, - /* close */ nullclose, - /* read */ noread, - /* write */ nowrite, - /* ioctl */ openfirm_ioctl, - /* poll */ nopoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "openfirm", - /* maj */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ 0, - /* kqfilter */ nokqfilter + .d_open = nullopen, + .d_close = nullclose, + .d_ioctl = openfirm_ioctl, + .d_name = "openfirm", + .d_maj = CDEV_MAJOR, }; static phandle_t lastnode; /* speed hack */ |