summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
committerphk <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
commitad925439e08646e188eb1c0e0be355f0685c8739 (patch)
tree0896a7d99c90ad922a1e4b41f052d155256cb97e /sys/dev/syscons
parentd68e8ba04cb070f349043edccaafae5facffab48 (diff)
downloadFreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.zip
FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.tar.gz
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/syscons.c6
-rw-r--r--sys/dev/syscons/sysmouse.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index f05de84..69ab21f 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -194,8 +194,6 @@ static int update_kbd_state(scr_stat *scp, int state, int mask);
static int update_kbd_leds(scr_stat *scp, int which);
static timeout_t blink_screen;
-#define CDEV_MAJOR 12
-
static cn_probe_t sccnprobe;
static cn_init_t sccninit;
static cn_getc_t sccngetc;
@@ -218,14 +216,14 @@ static d_ioctl_t scioctl;
static d_mmap_t scmmap;
static struct cdevsw sc_cdevsw = {
+ .d_version = D_VERSION,
.d_open = scopen,
.d_close = scclose,
.d_read = scread,
.d_ioctl = scioctl,
.d_mmap = scmmap,
.d_name = "sc",
- .d_maj = CDEV_MAJOR,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
int
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index 08847a0..7aa72cf 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -49,11 +49,12 @@ static d_close_t smclose;
static d_ioctl_t smioctl;
static struct cdevsw sm_cdevsw = {
+ .d_version = D_VERSION,
.d_open = smopen,
.d_close = smclose,
.d_ioctl = smioctl,
.d_name = "sysmouse",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
/* local variables */
OpenPOWER on IntegriCloud