aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
commit7ac40f5f59dea6e9ab4869e974bdd4026274e921 (patch)
tree4e91d5779ffebe1d75e975aa4450f35f965430eb /sys/cam
parent03f5c0014428be25ffe752865c2a06b1c2cd9347 (diff)
downloadsrc-7ac40f5f59dea6e9ab4869e974bdd4026274e921.tar.gz
src-7ac40f5f59dea6e9ab4869e974bdd4026274e921.zip
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)
Notes
Notes: svn path=/head/; revision=111815
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_xpt.c18
-rw-r--r--sys/cam/scsi/scsi_cd.c22
-rw-r--r--sys/cam/scsi/scsi_ch.c18
-rw-r--r--sys/cam/scsi/scsi_pass.c18
-rw-r--r--sys/cam/scsi/scsi_pt.c21
-rw-r--r--sys/cam/scsi/scsi_sa.c22
-rw-r--r--sys/cam/scsi/scsi_ses.c18
-rw-r--r--sys/cam/scsi/scsi_target.c24
8 files changed, 56 insertions, 105 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index e22357b4e636..0678380e1dc8 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -636,19 +636,11 @@ static d_close_t xptclose;
static d_ioctl_t xptioctl;
static struct cdevsw xpt_cdevsw = {
- /* open */ xptopen,
- /* close */ xptclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ xptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "xpt",
- /* maj */ XPT_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = xptopen,
+ .d_close = xptclose,
+ .d_ioctl = xptioctl,
+ .d_name = "xpt",
+ .d_maj = XPT_CDEV_MAJOR,
};
static struct intr_config_hook *xpt_config_hook;
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index f785962786f2..a76ec02107c9 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -288,19 +288,15 @@ static struct periph_driver cddriver =
PERIPHDRIVER_DECLARE(cd, cddriver);
static struct cdevsw cd_cdevsw = {
- /* open */ cdopen,
- /* close */ cdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ cdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ cdstrategy,
- /* name */ "cd",
- /* maj */ CD_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = cdopen,
+ .d_close = cdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = cdioctl,
+ .d_strategy = cdstrategy,
+ .d_name = "cd",
+ .d_maj = CD_CDEV_MAJOR,
+ .d_flags = D_DISK,
};
static int num_changers;
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index fcbb53bac37b..d64b78c6c2cc 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -211,19 +211,11 @@ static struct periph_driver chdriver =
PERIPHDRIVER_DECLARE(ch, chdriver);
static struct cdevsw ch_cdevsw = {
- /* open */ chopen,
- /* close */ chclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ chioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ch",
- /* maj */ CH_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = chopen,
+ .d_close = chclose,
+ .d_ioctl = chioctl,
+ .d_name = "ch",
+ .d_maj = CH_CDEV_MAJOR,
};
static void
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index 13580a00ee4b..bbe9939ce02d 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -105,19 +105,11 @@ static struct periph_driver passdriver =
PERIPHDRIVER_DECLARE(pass, passdriver);
static struct cdevsw pass_cdevsw = {
- /* open */ passopen,
- /* close */ passclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ passioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pass",
- /* maj */ PASS_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = passopen,
+ .d_close = passclose,
+ .d_ioctl = passioctl,
+ .d_name = "pass",
+ .d_maj = PASS_CDEV_MAJOR,
};
static void
diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c
index a7c29e7442dc..ec3409b6c3b5 100644
--- a/sys/cam/scsi/scsi_pt.c
+++ b/sys/cam/scsi/scsi_pt.c
@@ -118,19 +118,14 @@ PERIPHDRIVER_DECLARE(pt, ptdriver);
#define PT_CDEV_MAJOR 61
static struct cdevsw pt_cdevsw = {
- /* open */ ptopen,
- /* close */ ptclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ ptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ ptstrategy,
- /* name */ "pt",
- /* maj */ PT_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ptopen,
+ .d_close = ptclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = ptioctl,
+ .d_strategy = ptstrategy,
+ .d_name = "pt",
+ .d_maj = PT_CDEV_MAJOR,
};
#ifndef SCSI_PT_DEFAULT_TIMEOUT
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index e77865bee5e7..6ab3b5a438e6 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -426,19 +426,15 @@ PERIPHDRIVER_DECLARE(sa, sadriver);
#define SA_CDEV_MAJOR 14
static struct cdevsw sa_cdevsw = {
- /* open */ saopen,
- /* close */ saclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ saioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ sastrategy,
- /* name */ "sa",
- /* maj */ SA_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TAPE,
+ .d_open = saopen,
+ .d_close = saclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = saioctl,
+ .d_strategy = sastrategy,
+ .d_name = "sa",
+ .d_maj = SA_CDEV_MAJOR,
+ .d_flags = D_TAPE,
};
static int
diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c
index 096c08bd245a..fcdb4507513f 100644
--- a/sys/cam/scsi/scsi_ses.c
+++ b/sys/cam/scsi/scsi_ses.c
@@ -176,19 +176,11 @@ PERIPHDRIVER_DECLARE(ses, sesdriver);
static struct cdevsw ses_cdevsw =
{
- /* open */ sesopen,
- /* close */ sesclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ sesioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ses",
- /* maj */ SES_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = sesopen,
+ .d_close = sesclose,
+ .d_ioctl = sesioctl,
+ .d_name = "ses",
+ .d_maj = SES_CDEV_MAJOR,
};
static void
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index 4e95c06dd06b..de7e05cea617 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -105,20 +105,16 @@ static struct filterops targread_filtops =
#define TARG_CDEV_MAJOR 65
static struct cdevsw targ_cdevsw = {
- /* open */ targopen,
- /* close */ targclose,
- /* read */ targread,
- /* write */ targwrite,
- /* ioctl */ targioctl,
- /* poll */ targpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "targ",
- /* maj */ TARG_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_KQFILTER,
- /* kqfilter */ targkqfilter
+ .d_open = targopen,
+ .d_close = targclose,
+ .d_read = targread,
+ .d_write = targwrite,
+ .d_ioctl = targioctl,
+ .d_poll = targpoll,
+ .d_name = "targ",
+ .d_maj = TARG_CDEV_MAJOR,
+ .d_flags = D_KQFILTER,
+ .d_kqfilter = targkqfilter
};
static cam_status targendislun(struct cam_path *path, int enable,