summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-16 09:47:26 +0000
committerphk <phk@FreeBSD.org>2004-06-16 09:47:26 +0000
commitdfd1f7fd50fffaf75541921fcf86454cd8eb3614 (patch)
tree624c885995e84df6decddd3291c60a15e50e3c85 /sys/dev
parentcafb94bcea1cdf048e81b7eb2d24808e1a8c5280 (diff)
downloadFreeBSD-src-dfd1f7fd50fffaf75541921fcf86454cd8eb3614.zip
FreeBSD-src-dfd1f7fd50fffaf75541921fcf86454cd8eb3614.tar.gz
Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac.c8
-rw-r--r--sys/dev/aac/aacvar.h2
-rw-r--r--sys/dev/acpi_support/acpi_asus.c6
-rw-r--r--sys/dev/acpica/acpi.c6
-rw-r--r--sys/dev/acpica/acpivar.h2
-rw-r--r--sys/dev/adlink/adlink.c8
-rw-r--r--sys/dev/agp/agp.c8
-rw-r--r--sys/dev/agp/agppriv.h2
-rw-r--r--sys/dev/amr/amr.c8
-rw-r--r--sys/dev/amr/amrvar.h2
-rw-r--r--sys/dev/asr/asr.c14
-rw-r--r--sys/dev/ata/ata-all.c2
-rw-r--r--sys/dev/ata/atapi-tape.c8
-rw-r--r--sys/dev/ata/atapi-tape.h2
-rw-r--r--sys/dev/atkbdc/psm.c14
-rw-r--r--sys/dev/bktr/bktr_core.c2
-rw-r--r--sys/dev/bktr/bktr_core.h2
-rw-r--r--sys/dev/bktr/bktr_os.c14
-rw-r--r--sys/dev/bktr/bktr_reg.h12
-rw-r--r--sys/dev/ciss/ciss.c6
-rw-r--r--sys/dev/ciss/cissvar.h2
-rw-r--r--sys/dev/cp/if_cp.c10
-rw-r--r--sys/dev/ctau/if_ct.c10
-rw-r--r--sys/dev/cx/if_cx.c14
-rw-r--r--sys/dev/cy/cy.c8
-rw-r--r--sys/dev/dcons/dcons.c12
-rw-r--r--sys/dev/digi/digi.c10
-rw-r--r--sys/dev/digi/digi.h4
-rw-r--r--sys/dev/drm/drmP.h2
-rw-r--r--sys/dev/drm/drm_drv.h6
-rw-r--r--sys/dev/drm/drm_fops.h6
-rw-r--r--sys/dev/drm/drm_os_freebsd.h4
-rw-r--r--sys/dev/drm/drm_vm.h4
-rw-r--r--sys/dev/fb/creatorreg.h2
-rw-r--r--sys/dev/fb/gfb.h2
-rw-r--r--sys/dev/fb/vga.c12
-rw-r--r--sys/dev/fb/vgareg.h12
-rw-r--r--sys/dev/fdc/fdc.c16
-rw-r--r--sys/dev/firewire/firewirereg.h6
-rw-r--r--sys/dev/firewire/fwdev.c22
-rw-r--r--sys/dev/firewire/fwmem.c14
-rw-r--r--sys/dev/firewire/fwohci.c2
-rw-r--r--sys/dev/gfb/gfb_pci.c12
-rw-r--r--sys/dev/ida/ida.c2
-rw-r--r--sys/dev/ida/idavar.h2
-rw-r--r--sys/dev/iicbus/iic.c12
-rw-r--r--sys/dev/iir/iir.h6
-rw-r--r--sys/dev/iir/iir_ctrl.c16
-rw-r--r--sys/dev/ips/ips.c6
-rw-r--r--sys/dev/ips/ips.h2
-rw-r--r--sys/dev/isp/isp_freebsd.c2
-rw-r--r--sys/dev/joy/joy.c8
-rw-r--r--sys/dev/joy/joyvar.h2
-rw-r--r--sys/dev/kbd/kbd.c12
-rw-r--r--sys/dev/kbd/kbdreg.h2
-rw-r--r--sys/dev/led/led.c8
-rw-r--r--sys/dev/led/led.h4
-rw-r--r--sys/dev/matcd/matcd.c18
-rw-r--r--sys/dev/matcd/matcd_data.h2
-rw-r--r--sys/dev/mcd/mcd.c10
-rw-r--r--sys/dev/mcd/mcdvar.h2
-rw-r--r--sys/dev/md/md.c6
-rw-r--r--sys/dev/mlx/mlx.c8
-rw-r--r--sys/dev/mlx/mlxvar.h2
-rw-r--r--sys/dev/mly/mly.c6
-rw-r--r--sys/dev/mly/mlyvar.h2
-rw-r--r--sys/dev/mse/mse.c18
-rw-r--r--sys/dev/nmdm/nmdm.c16
-rw-r--r--sys/dev/null/null.c10
-rw-r--r--sys/dev/ofw/ofw_console.c6
-rw-r--r--sys/dev/ofw/openfirmio.c4
-rw-r--r--sys/dev/ofw/openpromio.c8
-rw-r--r--sys/dev/pci/pci.c2
-rw-r--r--sys/dev/pci/pci_user.c6
-rw-r--r--sys/dev/ppbus/lpt.c10
-rw-r--r--sys/dev/ppbus/pcfclock.c14
-rw-r--r--sys/dev/ppbus/ppi.c10
-rw-r--r--sys/dev/ppbus/pps.c10
-rw-r--r--sys/dev/random/randomdev.c12
-rw-r--r--sys/dev/rc/rc.c12
-rw-r--r--sys/dev/rp/rp.c10
-rw-r--r--sys/dev/rp/rpreg.h2
-rw-r--r--sys/dev/sab/sab.c8
-rw-r--r--sys/dev/scd/scd.c6
-rw-r--r--sys/dev/scd/scdvar.h2
-rw-r--r--sys/dev/si/si.c12
-rw-r--r--sys/dev/sio/sio.c12
-rw-r--r--sys/dev/smbus/smb.c8
-rw-r--r--sys/dev/snp/snp.c24
-rw-r--r--sys/dev/sound/pcm/dsp.c30
-rw-r--r--sys/dev/sound/pcm/mixer.c22
-rw-r--r--sys/dev/sound/pcm/mixer.h2
-rw-r--r--sys/dev/sound/pcm/sndstat.c8
-rw-r--r--sys/dev/sound/pcm/sound.h10
-rw-r--r--sys/dev/speaker/spkr.c10
-rw-r--r--sys/dev/streams/streams.c6
-rw-r--r--sys/dev/sx/sx.c8
-rw-r--r--sys/dev/syscons/scvesactl.c2
-rw-r--r--sys/dev/syscons/syscons.c26
-rw-r--r--sys/dev/syscons/syscons.h4
-rw-r--r--sys/dev/syscons/sysmouse.c8
-rw-r--r--sys/dev/tdfx/tdfx_pci.c8
-rw-r--r--sys/dev/tdfx/tdfx_vars.h2
-rw-r--r--sys/dev/ti/if_ti.c6
-rw-r--r--sys/dev/ti/if_tireg.h2
-rw-r--r--sys/dev/twa/twa.h2
-rw-r--r--sys/dev/twa/twa_freebsd.c8
-rw-r--r--sys/dev/twe/twe_compat.h2
-rw-r--r--sys/dev/twe/twe_freebsd.c8
-rw-r--r--sys/dev/uart/uart_bus.h2
-rw-r--r--sys/dev/uart/uart_tty.c6
-rw-r--r--sys/dev/usb/ubser.c12
-rw-r--r--sys/dev/usb/ucom.c10
-rw-r--r--sys/dev/usb/ucomvar.h2
-rw-r--r--sys/dev/usb/ufm.c8
-rw-r--r--sys/dev/usb/ugen.c20
-rw-r--r--sys/dev/usb/uhid.c14
-rw-r--r--sys/dev/usb/ulpt.c12
-rw-r--r--sys/dev/usb/ums.c12
-rw-r--r--sys/dev/usb/urio.c14
-rw-r--r--sys/dev/usb/usb.c10
-rw-r--r--sys/dev/usb/uscanner.c12
-rw-r--r--sys/dev/vinum/vinum.c12
-rw-r--r--sys/dev/vinum/vinumext.h10
-rw-r--r--sys/dev/vinum/vinumioctl.c4
-rw-r--r--sys/dev/vinum/vinumobj.h8
-rw-r--r--sys/dev/vinum/vinumutil.c11
-rw-r--r--sys/dev/watchdog/watchdog.c4
-rw-r--r--sys/dev/zs/z8530var.h2
-rw-r--r--sys/dev/zs/zs.c6
130 files changed, 526 insertions, 521 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 9a09cf8..03978ab 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -2301,7 +2301,7 @@ aac_describe_code(struct aac_code_lookup *table, u_int32_t code)
*/
static int
-aac_open(dev_t dev, int flags, int fmt, d_thread_t *td)
+aac_open(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
struct aac_softc *sc;
@@ -2319,7 +2319,7 @@ aac_open(dev_t dev, int flags, int fmt, d_thread_t *td)
}
static int
-aac_close(dev_t dev, int flags, int fmt, d_thread_t *td)
+aac_close(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
struct aac_softc *sc;
@@ -2334,7 +2334,7 @@ aac_close(dev_t dev, int flags, int fmt, d_thread_t *td)
}
static int
-aac_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td)
+aac_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td)
{
union aac_statrequest *as;
struct aac_softc *sc;
@@ -2433,7 +2433,7 @@ aac_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td)
}
static int
-aac_poll(dev_t dev, int poll_events, d_thread_t *td)
+aac_poll(struct cdev *dev, int poll_events, d_thread_t *td)
{
struct aac_softc *sc;
int revents;
diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h
index bedc6b0..6a8b04f 100644
--- a/sys/dev/aac/aacvar.h
+++ b/sys/dev/aac/aacvar.h
@@ -344,7 +344,7 @@ struct aac_softc
struct intr_config_hook aac_ich;
/* management interface */
- dev_t aac_dev_t;
+ struct cdev *aac_dev_t;
aac_lock_t aac_aifq_lock;
struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
int aac_aifq_head;
diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c
index f16121b..10d97e4 100644
--- a/sys/dev/acpi_support/acpi_asus.c
+++ b/sys/dev/acpi_support/acpi_asus.c
@@ -83,9 +83,9 @@ struct acpi_asus_softc {
struct sysctl_ctx_list sysctl_ctx;
struct sysctl_oid *sysctl_tree;
- dev_t s_mled;
- dev_t s_tled;
- dev_t s_wled;
+ struct cdev *s_mled;
+ struct cdev *s_tled;
+ struct cdev *s_wled;
int s_brn;
int s_disp;
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 0f0712b..ffc66d2 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2455,19 +2455,19 @@ acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn)
}
static int
-acpiopen(dev_t dev, int flag, int fmt, d_thread_t *td)
+acpiopen(struct cdev *dev, int flag, int fmt, d_thread_t *td)
{
return (0);
}
static int
-acpiclose(dev_t dev, int flag, int fmt, d_thread_t *td)
+acpiclose(struct cdev *dev, int flag, int fmt, d_thread_t *td)
{
return (0);
}
static int
-acpiioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td)
+acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td)
{
struct acpi_softc *sc;
struct acpi_ioctl_hook *hp;
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 959681d..c0bc481 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -45,7 +45,7 @@ typedef vm_offset_t vm_paddr_t;
struct acpi_softc {
device_t acpi_dev;
- dev_t acpi_dev_t;
+ struct cdev *acpi_dev_t;
struct resource *acpi_irq;
int acpi_irq_rid;
diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c
index 1d6b8611..b32ef3d 100644
--- a/sys/dev/adlink/adlink.c
+++ b/sys/dev/adlink/adlink.c
@@ -104,7 +104,7 @@ struct softc {
struct resource *r0, *r1, *ri;
bus_space_tag_t t0, t1;
bus_space_handle_t h0, h1;
- dev_t dev;
+ struct cdev *dev;
off_t mapvir;
struct proc *procp;
@@ -241,7 +241,7 @@ adlink_loran(void *arg)
}
static int
-adlink_open(dev_t dev, int oflags, int devtype, struct thread *td)
+adlink_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
static int once;
struct softc *sc;
@@ -307,7 +307,7 @@ adlink_open(dev_t dev, int oflags, int devtype, struct thread *td)
}
static int
-adlink_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
+adlink_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
struct softc *sc;
struct wave *wp;
@@ -341,7 +341,7 @@ adlink_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
}
static int
-adlink_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
+adlink_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
{
struct softc *sc;
struct wave *wp;
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index 46f10a3..239b5bf 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -762,7 +762,7 @@ agp_unbind_user(device_t dev, agp_unbind *unbind)
}
static int
-agp_open(dev_t kdev, int oflags, int devtype, struct thread *td)
+agp_open(struct cdev *kdev, int oflags, int devtype, struct thread *td)
{
device_t dev = KDEV2DEV(kdev);
struct agp_softc *sc = device_get_softc(dev);
@@ -776,7 +776,7 @@ agp_open(dev_t kdev, int oflags, int devtype, struct thread *td)
}
static int
-agp_close(dev_t kdev, int fflag, int devtype, struct thread *td)
+agp_close(struct cdev *kdev, int fflag, int devtype, struct thread *td)
{
device_t dev = KDEV2DEV(kdev);
struct agp_softc *sc = device_get_softc(dev);
@@ -799,7 +799,7 @@ agp_close(dev_t kdev, int fflag, int devtype, struct thread *td)
}
static int
-agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
+agp_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
device_t dev = KDEV2DEV(kdev);
@@ -834,7 +834,7 @@ agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
}
static int
-agp_mmap(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
+agp_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
{
device_t dev = KDEV2DEV(kdev);
struct agp_softc *sc = device_get_softc(dev);
diff --git a/sys/dev/agp/agppriv.h b/sys/dev/agp/agppriv.h
index 6ba4ed6..7e846d1 100644
--- a/sys/dev/agp/agppriv.h
+++ b/sys/dev/agp/agppriv.h
@@ -75,7 +75,7 @@ struct agp_softc {
struct agp_memory_list as_memory; /* list of allocated memory */
int as_nextid; /* next memory block id */
int as_isopen; /* user device is open */
- dev_t as_devnode; /* from make_dev */
+ struct cdev *as_devnode; /* from make_dev */
struct mtx as_lock; /* lock for access to GATT */
};
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index 0fce755..f206b02 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -343,7 +343,7 @@ amr_free(struct amr_softc *sc)
}
/* destroy control device */
- if( sc->amr_dev_t != (dev_t)NULL)
+ if( sc->amr_dev_t != (struct cdev *)NULL)
destroy_dev(sc->amr_dev_t);
}
@@ -365,7 +365,7 @@ amr_submit_bio(struct amr_softc *sc, struct bio *bio)
* Accept an open operation on the control device.
*/
static int
-amr_open(dev_t dev, int flags, int fmt, d_thread_t *td)
+amr_open(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
int unit = minor(dev);
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
@@ -380,7 +380,7 @@ amr_open(dev_t dev, int flags, int fmt, d_thread_t *td)
* Accept the last close on the control device.
*/
static int
-amr_close(dev_t dev, int flags, int fmt, d_thread_t *td)
+amr_close(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
int unit = minor(dev);
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
@@ -395,7 +395,7 @@ amr_close(dev_t dev, int flags, int fmt, d_thread_t *td)
* Handle controller-specific control operations.
*/
static int
-amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
+amr_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
{
struct amr_softc *sc = (struct amr_softc *)dev->si_drv1;
int *arg = (int *)addr;
diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h
index 2378c97..fcfb397 100644
--- a/sys/dev/amr/amrvar.h
+++ b/sys/dev/amr/amrvar.h
@@ -202,7 +202,7 @@ struct amr_softc
TAILQ_HEAD(, ccb_hdr) amr_cam_ccbq;
/* control device */
- dev_t amr_dev_t;
+ struct cdev *amr_dev_t;
/* controller type-specific support */
int amr_type;
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index fa29dd8..8b40347 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -358,7 +358,7 @@ typedef struct Asr_softc {
/* Links into other parents and HBAs */
struct Asr_softc * ha_next; /* HBA list */
- dev_t ha_devt;
+ struct cdev *ha_devt;
} Asr_softc_t;
static Asr_softc_t * Asr_softc;
@@ -371,11 +371,11 @@ static Asr_softc_t * Asr_softc;
static int asr_probe(device_t tag);
static int asr_attach(device_t tag);
-static int asr_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag,
+static int asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
struct thread *td);
-static int asr_open(dev_t dev, int32_t flags, int32_t ifmt,
+static int asr_open(struct cdev *dev, int32_t flags, int32_t ifmt,
struct thread *td);
-static int asr_close(dev_t dev, int flags, int ifmt, struct thread *td);
+static int asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td);
static int asr_intr(Asr_softc_t *sc);
static void asr_timeout(void *arg);
static int ASR_init(Asr_softc_t *sc);
@@ -2999,7 +2999,7 @@ typedef U32 DPT_RTN_T;
static u_int8_t ASR_ctlr_held;
static int
-asr_open(dev_t dev, int32_t flags, int32_t ifmt, struct thread *td)
+asr_open(struct cdev *dev, int32_t flags, int32_t ifmt, struct thread *td)
{
int s;
int error;
@@ -3018,7 +3018,7 @@ asr_open(dev_t dev, int32_t flags, int32_t ifmt, struct thread *td)
} /* asr_open */
static int
-asr_close(dev_t dev, int flags, int ifmt, struct thread *td)
+asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td)
{
ASR_ctlr_held = 0;
@@ -3495,7 +3495,7 @@ ASR_queue_i(Asr_softc_t *sc, PI2O_MESSAGE_FRAME Packet)
/*----------------------------------------------------------------------*/
static int
-asr_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
Asr_softc_t *sc = dev->si_drv1;
int i, error = 0;
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 9a31973..b0d7893 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -359,7 +359,7 @@ ata_shutdown(void *arg, int howto)
* device related interfaces
*/
static int
-ata_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
+ata_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
{
struct ata_cmd *iocmd = (struct ata_cmd *)addr;
device_t device = devclass_get_device(ata_devclass, iocmd->channel);
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index c6ae4b7..19e6100 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -94,7 +94,7 @@ ast_attach(struct ata_device *atadev)
{
struct ast_softc *stp;
struct ast_readposition position;
- dev_t dev;
+ struct cdev *dev;
stp = malloc(sizeof(struct ast_softc), M_AST, M_NOWAIT | M_ZERO);
if (!stp) {
@@ -265,7 +265,7 @@ ast_describe(struct ast_softc *stp)
}
static int
-ast_open(dev_t dev, int flags, int fmt, struct thread *td)
+ast_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct ast_softc *stp = dev->si_drv1;
@@ -290,7 +290,7 @@ ast_open(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-ast_close(dev_t dev, int flags, int fmt, struct thread *td)
+ast_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct ast_softc *stp = dev->si_drv1;
@@ -319,7 +319,7 @@ ast_close(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-ast_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+ast_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct ast_softc *stp = dev->si_drv1;
int error = 0;
diff --git a/sys/dev/ata/atapi-tape.h b/sys/dev/ata/atapi-tape.h
index 15e3cbb..f34328d 100644
--- a/sys/dev/ata/atapi-tape.h
+++ b/sys/dev/ata/atapi-tape.h
@@ -159,5 +159,5 @@ struct ast_softc {
struct atapi_params *param; /* drive parameters table */
struct ast_cappage cap; /* capabilities page info */
struct devstat *stats; /* devstat entry */
- dev_t dev1, dev2; /* device place holders */
+ struct cdev *dev1, *dev2; /* device place holders */
};
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 376c0dc..2d30d65 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -176,8 +176,8 @@ struct psm_softc { /* Driver status information */
int watchdog; /* watchdog timer flag */
struct callout_handle callout; /* watchdog timer call out */
struct callout_handle softcallout; /* buffer timer call out */
- dev_t dev;
- dev_t bdev;
+ struct cdev *dev;
+ struct cdev *bdev;
int lasterr;
int cmdcount;
};
@@ -1307,7 +1307,7 @@ psmdetach(device_t dev)
}
static int
-psmopen(dev_t dev, int flag, int fmt, struct thread *td)
+psmopen(struct cdev *dev, int flag, int fmt, struct thread *td)
{
int unit = PSM_UNIT(dev);
struct psm_softc *sc;
@@ -1391,7 +1391,7 @@ psmopen(dev_t dev, int flag, int fmt, struct thread *td)
}
static int
-psmclose(dev_t dev, int flag, int fmt, struct thread *td)
+psmclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
int unit = PSM_UNIT(dev);
struct psm_softc *sc = PSM_SOFTC(unit);
@@ -1533,7 +1533,7 @@ tame_mouse(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *status, unsigne
}
static int
-psmread(dev_t dev, struct uio *uio, int flag)
+psmread(struct cdev *dev, struct uio *uio, int flag)
{
register struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
unsigned char buf[PSM_SMALLBUFSIZE];
@@ -1681,7 +1681,7 @@ unblock_mouse_data(struct psm_softc *sc, int c)
}
static int
-psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+psmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
mousemode_t mode;
@@ -2506,7 +2506,7 @@ psmsoftintr(void *arg)
}
static int
-psmpoll(dev_t dev, int events, struct thread *td)
+psmpoll(struct cdev *dev, int events, struct thread *td)
{
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
int s;
diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c
index a71d708..d8b381f 100644
--- a/sys/dev/bktr/bktr_core.c
+++ b/sys/dev/bktr/bktr_core.c
@@ -1191,7 +1191,7 @@ vbi_close( bktr_ptr_t bktr )
*
*/
int
-video_read(bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio)
+video_read(bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio)
{
int status;
int count;
diff --git a/sys/dev/bktr/bktr_core.h b/sys/dev/bktr/bktr_core.h
index 5948ab6..315566f 100644
--- a/sys/dev/bktr/bktr_core.h
+++ b/sys/dev/bktr/bktr_core.h
@@ -80,7 +80,7 @@ int common_bktr_intr( void *arg );
/* Prototypes for open, close, read, mmap and ioctl calls */
int video_open( bktr_ptr_t bktr );
int video_close( bktr_ptr_t bktr );
-int video_read( bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio );
+int video_read( bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio );
int video_ioctl( bktr_ptr_t bktr, int unit,
ioctl_cmd_t cmd, caddr_t arg, struct thread* pr );
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index d7bd9ba..87d4ed9 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -580,7 +580,7 @@ get_bktr_mem( int unit, unsigned size )
*
*/
static int
-bktr_open( dev_t dev, int flags, int fmt, struct thread *td )
+bktr_open( struct cdev *dev, int flags, int fmt, struct thread *td )
{
bktr_ptr_t bktr;
int unit;
@@ -680,7 +680,7 @@ bktr_open( dev_t dev, int flags, int fmt, struct thread *td )
*
*/
static int
-bktr_close( dev_t dev, int flags, int fmt, struct thread *td )
+bktr_close( struct cdev *dev, int flags, int fmt, struct thread *td )
{
bktr_ptr_t bktr;
int unit;
@@ -719,7 +719,7 @@ bktr_close( dev_t dev, int flags, int fmt, struct thread *td )
*
*/
static int
-bktr_read( dev_t dev, struct uio *uio, int ioflag )
+bktr_read( struct cdev *dev, struct uio *uio, int ioflag )
{
bktr_ptr_t bktr;
int unit;
@@ -747,7 +747,7 @@ bktr_read( dev_t dev, struct uio *uio, int ioflag )
*
*/
static int
-bktr_write( dev_t dev, struct uio *uio, int ioflag )
+bktr_write( struct cdev *dev, struct uio *uio, int ioflag )
{
return( EINVAL ); /* XXX or ENXIO ? */
}
@@ -757,7 +757,7 @@ bktr_write( dev_t dev, struct uio *uio, int ioflag )
*
*/
static int
-bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td )
+bktr_ioctl( struct cdev *dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td )
{
bktr_ptr_t bktr;
int unit;
@@ -789,7 +789,7 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td
*
*/
static int
-bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot )
+bktr_mmap( struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot )
{
int unit;
bktr_ptr_t bktr;
@@ -820,7 +820,7 @@ bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot )
}
static int
-bktr_poll( dev_t dev, int events, struct thread *td)
+bktr_poll( struct cdev *dev, int events, struct thread *td)
{
int unit;
bktr_ptr_t bktr;
diff --git a/sys/dev/bktr/bktr_reg.h b/sys/dev/bktr/bktr_reg.h
index a7c3ef5..c8fc4d4 100644
--- a/sys/dev/bktr/bktr_reg.h
+++ b/sys/dev/bktr/bktr_reg.h
@@ -535,12 +535,12 @@ struct bktr_softc {
int irq_rid; /* 4.x resource id */
struct resource *res_irq; /* 4.x resource descriptor for interrupt */
void *res_ih; /* 4.x newbus interrupt handler cookie */
- dev_t bktrdev; /* 4.x device entry for /dev/bktrN */
- dev_t tunerdev; /* 4.x device entry for /dev/tunerN */
- dev_t vbidev; /* 4.x device entry for /dev/vbiN */
- dev_t bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */
- dev_t tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */
- dev_t vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */
+ struct cdev *bktrdev; /* 4.x device entry for /dev/bktrN */
+ struct cdev *tunerdev; /* 4.x device entry for /dev/tunerN */
+ struct cdev *vbidev; /* 4.x device entry for /dev/vbiN */
+ struct cdev *bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */
+ struct cdev *tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */
+ struct cdev *vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */
#endif
#if (__FreeBSD_version >= 500000)
struct mtx vbimutex; /* Mutex protecting vbi buffer */
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 6e328e6..c04136d 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -3738,7 +3738,7 @@ ciss_name_command_status(int status)
* Handle an open on the control device.
*/
static int
-ciss_open(dev_t dev, int flags, int fmt, d_thread_t *p)
+ciss_open(struct cdev *dev, int flags, int fmt, d_thread_t *p)
{
struct ciss_softc *sc;
@@ -3756,7 +3756,7 @@ ciss_open(dev_t dev, int flags, int fmt, d_thread_t *p)
* Handle the last close on the control device.
*/
static int
-ciss_close(dev_t dev, int flags, int fmt, d_thread_t *p)
+ciss_close(struct cdev *dev, int flags, int fmt, d_thread_t *p)
{
struct ciss_softc *sc;
@@ -3775,7 +3775,7 @@ ciss_close(dev_t dev, int flags, int fmt, d_thread_t *p)
* simplify the porting of Compaq's userland tools.
*/
static int
-ciss_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *p)
+ciss_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *p)
{
struct ciss_softc *sc;
int error;
diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h
index 717351f..b1bdd42 100644
--- a/sys/dev/ciss/cissvar.h
+++ b/sys/dev/ciss/cissvar.h
@@ -173,7 +173,7 @@ struct ciss_softc
{
/* bus connections */
device_t ciss_dev; /* bus attachment */
- dev_t ciss_dev_t; /* control device */
+ struct cdev *ciss_dev_t; /* control device */
struct resource *ciss_regs_resource; /* register interface window */
int ciss_regs_rid; /* resource ID */
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c
index 945c863..04427c3 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -161,7 +161,7 @@ typedef struct _drv_t {
struct sppp pp;
#endif
#if __FreeBSD_version >= 400000
- dev_t devt;
+ struct cdev *devt;
#endif
} drv_t;
@@ -967,7 +967,7 @@ static void cp_error (cp_chan_t *c, int data)
#if __FreeBSD_version < 500000
static int cp_open (dev_t dev, int oflags, int devtype, struct proc *p)
#else
-static int cp_open (dev_t dev, int oflags, int devtype, struct thread *td)
+static int cp_open (struct cdev *dev, int oflags, int devtype, struct thread *td)
#endif
{
int unit = minor (dev);
@@ -985,7 +985,7 @@ static int cp_open (dev_t dev, int oflags, int devtype, struct thread *td)
#if __FreeBSD_version < 500000
static int cp_close (dev_t dev, int fflag, int devtype, struct proc *p)
#else
-static int cp_close (dev_t dev, int fflag, int devtype, struct thread *td)
+static int cp_close (struct cdev *dev, int fflag, int devtype, struct thread *td)
#endif
{
drv_t *d = channel [minor (dev)];
@@ -1013,7 +1013,7 @@ static int cp_modem_status (cp_chan_t *c)
#if __FreeBSD_version < 500000
static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
#else
-static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+static int cp_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#endif
{
drv_t *d = channel [minor (dev)];
@@ -2652,7 +2652,7 @@ static int cp_modevent (module_t mod, int type, void *unused)
#else /* __FreeBSD_version >= 400000 */
static int cp_modevent (module_t mod, int type, void *unused)
{
- dev_t dev;
+ struct cdev *dev;
static int load_count = 0;
struct cdevsw *cdsw;
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c
index cc5887a..a7462ab 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -172,7 +172,7 @@ typedef struct _drv_t {
struct sppp pp;
#endif
#if __FreeBSD_version >= 400000
- dev_t devt;
+ struct cdev *devt;
#endif
} drv_t;
@@ -1261,7 +1261,7 @@ static void ct_error (ct_chan_t *c, int data)
#if __FreeBSD_version < 500000
static int ct_open (dev_t dev, int oflags, int devtype, struct proc *p)
#else
-static int ct_open (dev_t dev, int oflags, int devtype, struct thread *td)
+static int ct_open (struct cdev *dev, int oflags, int devtype, struct thread *td)
#endif
{
drv_t *d;
@@ -1276,7 +1276,7 @@ static int ct_open (dev_t dev, int oflags, int devtype, struct thread *td)
#if __FreeBSD_version < 500000
static int ct_close (dev_t dev, int fflag, int devtype, struct proc *p)
#else
-static int ct_close (dev_t dev, int fflag, int devtype, struct thread *td)
+static int ct_close (struct cdev *dev, int fflag, int devtype, struct thread *td)
#endif
{
drv_t *d = channel [minor(dev)];
@@ -1313,7 +1313,7 @@ static int ct_modem_status (ct_chan_t *c)
#if __FreeBSD_version < 500000
static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
#else
-static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+static int ct_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#endif
{
drv_t *d = channel [minor (dev)];
@@ -2624,7 +2624,7 @@ static int ct_modevent (module_t mod, int type, void *unused)
#else /* __FreeBSD_version >= 400000 */
static int ct_modevent (module_t mod, int type, void *unused)
{
- dev_t dev;
+ struct cdev *dev;
static int load_count = 0;
struct cdevsw *cdsw;
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index 726de52..45c7f9e 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -212,7 +212,7 @@ typedef struct _drv_t {
struct sppp pp;
#endif
#if __FreeBSD_version >= 400000
- dev_t devt[3];
+ struct cdev *devt[3];
#endif
async_q aqueue;
#define CX_READ 1
@@ -1570,7 +1570,7 @@ static void cx_error (cx_chan_t *c, int data)
#if __FreeBSD_version < 500000
static int cx_open (dev_t dev, int flag, int mode, struct proc *p)
#else
-static int cx_open (dev_t dev, int flag, int mode, struct thread *td)
+static int cx_open (struct cdev *dev, int flag, int mode, struct thread *td)
#endif
{
int unit = UNIT (dev);
@@ -1710,7 +1710,7 @@ failed: if (! (d->tty->t_state & TS_ISOPEN)) {
#if __FreeBSD_version < 500000
static int cx_close (dev_t dev, int flag, int mode, struct proc *p)
#else
-static int cx_close (dev_t dev, int flag, int mode, struct thread *td)
+static int cx_close (struct cdev *dev, int flag, int mode, struct thread *td)
#endif
{
drv_t *d = channel [UNIT (dev)];
@@ -1756,7 +1756,7 @@ static int cx_close (dev_t dev, int flag, int mode, struct thread *td)
return 0;
}
-static int cx_read (dev_t dev, struct uio *uio, int flag)
+static int cx_read (struct cdev *dev, struct uio *uio, int flag)
{
drv_t *d = channel [UNIT (dev)];
@@ -1767,7 +1767,7 @@ static int cx_read (dev_t dev, struct uio *uio, int flag)
return ttyld_read (d->tty, uio, flag);
}
-static int cx_write (dev_t dev, struct uio *uio, int flag)
+static int cx_write (struct cdev *dev, struct uio *uio, int flag)
{
drv_t *d = channel [UNIT (dev)];
@@ -1798,7 +1798,7 @@ static int cx_modem_status (drv_t *d)
#if __FreeBSD_version < 500000
static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
#else
-static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+static int cx_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#endif
{
drv_t *d = channel [UNIT (dev)];
@@ -3172,7 +3172,7 @@ static int cx_modevent (module_t mod, int type, void *unused)
#else /* __FreeBSD_version >= 400000 */
static int cx_modevent (module_t mod, int type, void *unused)
{
- dev_t dev;
+ struct cdev *dev;
static int load_count = 0;
struct cdevsw *cdsw;
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 7065327..7808ecb 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -592,7 +592,7 @@ cyattach_common(cy_iobase, cy_align)
static int
sioopen(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td;
@@ -776,7 +776,7 @@ out:
static int
sioclose(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td;
@@ -891,7 +891,7 @@ comhardclose(com)
static int
siowrite(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -1528,7 +1528,7 @@ terminate_tx_service:
static int
sioioctl(dev, cmd, data, flag, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t data;
int flag;
diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c
index 3a5e302..5bdbbfb 100644
--- a/sys/dev/dcons/dcons.c
+++ b/sys/dev/dcons/dcons.c
@@ -129,7 +129,7 @@ struct dcons_buf *dcons_buf; /* for local dconschat */
/* per device data */
static struct dcons_softc {
- dev_t dev;
+ struct cdev *dev;
struct dcons_ch o, i;
int brk_state;
#define DC_GDB 1
@@ -159,7 +159,7 @@ CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc,
#endif
static int
-dcons_open(dev_t dev, int flag, int mode, struct THREAD *td)
+dcons_open(struct cdev *dev, int flag, int mode, struct THREAD *td)
{
struct tty *tp;
int unit, error, s;
@@ -198,7 +198,7 @@ dcons_open(dev_t dev, int flag, int mode, struct THREAD *td)
}
static int
-dcons_close(dev_t dev, int flag, int mode, struct THREAD *td)
+dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td)
{
int unit;
struct tty *tp;
@@ -312,17 +312,17 @@ dcons_cnputc(struct consdev *cp, int c)
}
#else
static int
-dcons_cngetc(dev_t dev)
+dcons_cngetc(struct cdev *dev)
{
return(dcons_getc((struct dcons_softc *)dev->si_drv1));
}
static int
-dcons_cncheckc(dev_t dev)
+dcons_cncheckc(struct cdev *dev)
{
return(dcons_checkc((struct dcons_softc *)dev->si_drv1));
}
static void
-dcons_cnputc(dev_t dev, int c)
+dcons_cnputc(struct cdev *dev, int c)
{
dcons_putc((struct dcons_softc *)dev->si_drv1, c);
}
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index c6b6b2c..c330290 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -694,7 +694,7 @@ digimctl(struct digi_p *port, int bits, int how)
}
static int
-digiopen(dev_t dev, int flag, int mode, struct thread *td)
+digiopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct digi_softc *sc;
struct tty *tp;
@@ -859,7 +859,7 @@ out:
}
static int
-digiclose(dev_t dev, int flag, int mode, struct thread *td)
+digiclose(struct cdev *dev, int flag, int mode, struct thread *td)
{
int mynor;
struct tty *tp;
@@ -938,7 +938,7 @@ digihardclose(struct digi_p *port)
}
static int
-digiread(dev_t dev, struct uio *uio, int flag)
+digiread(struct cdev *dev, struct uio *uio, int flag)
{
int mynor;
struct tty *tp;
@@ -964,7 +964,7 @@ digiread(dev_t dev, struct uio *uio, int flag)
}
static int
-digiwrite(dev_t dev, struct uio *uio, int flag)
+digiwrite(struct cdev *dev, struct uio *uio, int flag)
{
int mynor;
struct tty *tp;
@@ -1066,7 +1066,7 @@ digi_loadmoduledata(struct digi_softc *sc)
}
static int
-digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int unit, pnum, mynor, error, s;
struct digi_softc *sc;
diff --git a/sys/dev/digi/digi.h b/sys/dev/digi/digi.h
index f0c9f0e..8459d60 100644
--- a/sys/dev/digi/digi.h
+++ b/sys/dev/digi/digi.h
@@ -72,7 +72,7 @@ struct digi_p {
volatile struct board_chan *bc;
struct tty *tp;
- dev_t dev[6];
+ struct cdev *dev[6];
u_char *txbuf;
u_char *rxbuf;
@@ -164,7 +164,7 @@ struct digi_softc {
int iorid;
void *irqHandler;
int unit;
- dev_t ctldev;
+ struct cdev *ctldev;
} res;
u_char *vmem; /* virtual memory address */
diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h
index 7753b19..e45bad4 100644
--- a/sys/dev/drm/drmP.h
+++ b/sys/dev/drm/drmP.h
@@ -313,7 +313,7 @@ struct drm_device {
#ifdef __FreeBSD__
device_t device; /* Device instance from newbus */
#endif
- dev_t devnode; /* Device number for mknod */
+ struct cdev *devnode; /* Device number for mknod */
int if_version; /* Highest interface version set */
int flags; /* Flags to open(2) */
diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h
index d005ec4..642cc74 100644
--- a/sys/dev/drm/drm_drv.h
+++ b/sys/dev/drm/drm_drv.h
@@ -808,7 +808,7 @@ int DRM(version)( DRM_IOCTL_ARGS )
return 0;
}
-int DRM(open)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
+int DRM(open)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
{
drm_device_t *dev = NULL;
int retcode = 0;
@@ -833,7 +833,7 @@ int DRM(open)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
return retcode;
}
-int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
+int DRM(close)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
{
drm_file_t *priv;
DRM_DEVICE;
@@ -951,7 +951,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
/* DRM(ioctl) is called whenever a process performs an ioctl on /dev/drm.
*/
-int DRM(ioctl)(dev_t kdev, u_long cmd, caddr_t data, int flags,
+int DRM(ioctl)(struct cdev *kdev, u_long cmd, caddr_t data, int flags,
DRM_STRUCTPROC *p)
{
DRM_DEVICE;
diff --git a/sys/dev/drm/drm_fops.h b/sys/dev/drm/drm_fops.h
index 190b708..4c79fe1 100644
--- a/sys/dev/drm/drm_fops.h
+++ b/sys/dev/drm/drm_fops.h
@@ -54,7 +54,7 @@ drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p)
}
/* DRM(open_helper) is called whenever a process opens /dev/drm. */
-int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
+int DRM(open_helper)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p,
drm_device_t *dev)
{
int m = minor(kdev);
@@ -106,12 +106,12 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
/* The DRM(read) and DRM(poll) are stubs to prevent spurious errors
* on older X Servers (4.3.0 and earlier) */
-int DRM(read)(dev_t kdev, struct uio *uio, int ioflag)
+int DRM(read)(struct cdev *kdev, struct uio *uio, int ioflag)
{
return 0;
}
-int DRM(poll)(dev_t kdev, int events, DRM_STRUCTPROC *p)
+int DRM(poll)(struct cdev *kdev, int events, DRM_STRUCTPROC *p)
{
return 0;
}
diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h
index 24dcd10..750e6ec 100644
--- a/sys/dev/drm/drm_os_freebsd.h
+++ b/sys/dev/drm/drm_os_freebsd.h
@@ -151,7 +151,7 @@
* of the current process. It should be a per-open unique pointer, but
* code for that is not yet written */
#define DRMFILE void *
-#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
+#define DRM_IOCTL_ARGS struct cdev *kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
#define DRM_SUSER(p) suser(p)
#define DRM_TASKQUEUE_ARGS void *arg, int pending
#define DRM_IRQ_ARGS void *arg
@@ -473,7 +473,7 @@ extern d_close_t DRM(close);
extern d_read_t DRM(read);
extern d_poll_t DRM(poll);
extern d_mmap_t DRM(mmap);
-extern int DRM(open_helper)(dev_t kdev, int flags, int fmt,
+extern int DRM(open_helper)(struct cdev *kdev, int flags, int fmt,
DRM_STRUCTPROC *p, drm_device_t *dev);
extern drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev,
DRM_STRUCTPROC *p);
diff --git a/sys/dev/drm/drm_vm.h b/sys/dev/drm/drm_vm.h
index ab79d03..2637a83 100644
--- a/sys/dev/drm/drm_vm.h
+++ b/sys/dev/drm/drm_vm.h
@@ -26,7 +26,7 @@
*/
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
-static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr,
+static int DRM(dma_mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr,
int prot)
#elif defined(__FreeBSD__)
static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
@@ -55,7 +55,7 @@ static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
}
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
-int DRM(mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr,
+int DRM(mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr,
int prot)
#elif defined(__FreeBSD__)
int DRM(mmap)(dev_t kdev, vm_offset_t offset, int prot)
diff --git a/sys/dev/fb/creatorreg.h b/sys/dev/fb/creatorreg.h
index 6fa42f7..b3be9e2 100644
--- a/sys/dev/fb/creatorreg.h
+++ b/sys/dev/fb/creatorreg.h
@@ -142,7 +142,7 @@
struct creator_softc {
video_adapter_t sc_va; /* XXX must be first */
- dev_t sc_si;
+ struct cdev *sc_si;
struct resource *sc_reg[FFB_NREG];
bus_space_tag_t sc_bt[FFB_NREG];
diff --git a/sys/dev/fb/gfb.h b/sys/dev/fb/gfb.h
index 07ee5c9..470dfc2 100644
--- a/sys/dev/fb/gfb.h
+++ b/sys/dev/fb/gfb.h
@@ -166,7 +166,7 @@ typedef struct gfb_softc {
int type;
int model;
struct cdevsw *cdevsw;
- dev_t devt;
+ struct cdev *devt;
} *gfb_softc_t;
#endif /* _FB_GFB_H_ */
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
index 9f12813..3af5fda 100644
--- a/sys/dev/fb/vga.c
+++ b/sys/dev/fb/vga.c
@@ -109,7 +109,7 @@ vga_attach_unit(int unit, vga_softc_t *sc, int flags)
#ifdef FB_INSTALL_CDEV
int
-vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
+vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
{
if (sc == NULL)
return ENXIO;
@@ -120,32 +120,32 @@ vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
}
int
-vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
+vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
{
return genfbclose(&sc->gensc, sc->adp, flag, mode, td);
}
int
-vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag)
+vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag)
{
return genfbread(&sc->gensc, sc->adp, uio, flag);
}
int
-vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag)
+vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag)
{
return genfbread(&sc->gensc, sc->adp, uio, flag);
}
int
-vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag,
+vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag,
struct thread *td)
{
return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td);
}
int
-vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr,
+vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr,
int prot)
{
return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot);
diff --git a/sys/dev/fb/vgareg.h b/sys/dev/fb/vgareg.h
index f390318..e26c214 100644
--- a/sys/dev/fb/vgareg.h
+++ b/sys/dev/fb/vgareg.h
@@ -78,15 +78,15 @@ int vga_probe_unit(int unit, struct video_adapter *adp, int flags);
int vga_attach_unit(int unit, vga_softc_t *sc, int flags);
#ifdef FB_INSTALL_CDEV
-int vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode,
+int vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode,
struct thread *td);
-int vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode,
+int vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode,
struct thread *td);
-int vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag);
-int vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag);
-int vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg,
+int vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag);
+int vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag);
+int vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg,
int flag, struct thread *td);
-int vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset,
+int vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset,
vm_offset_t *paddr, int prot);
#endif
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 916df70..f61b11fb 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -301,7 +301,7 @@ struct fd_data {
struct callout_handle toffhandle;
struct callout_handle tohandle;
struct devstat *device_stats;
- dev_t masterdev;
+ struct cdev *masterdev;
device_t dev;
fdu_t fdu;
};
@@ -393,11 +393,11 @@ static timeout_t fd_iotimeout;
static timeout_t fd_pseudointr;
static driver_intr_t fdc_intr;
static int fdcpio(fdc_p, long, caddr_t, u_int);
-static int fdautoselect(dev_t);
+static int fdautoselect(struct cdev *);
static int fdstate(struct fdc_data *);
static int retrier(struct fdc_data *);
static void fdbiodone(struct bio *);
-static int fdmisccmd(dev_t, u_int, void *);
+static int fdmisccmd(struct cdev *, u_int, void *);
static d_ioctl_t fdioctl;
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
@@ -1496,7 +1496,7 @@ out_fdc(struct fdc_data *fdc, int x)
* auxiliary functions).
*/
static int
-fdopen(dev_t dev, int flags, int mode, struct thread *td)
+fdopen(struct cdev *dev, int flags, int mode, struct thread *td)
{
fd_p fd;
fdc_p fdc;
@@ -1591,7 +1591,7 @@ fdopen(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-fdclose(dev_t dev, int flags, int mode, struct thread *td)
+fdclose(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct fd_data *fd;
@@ -1795,7 +1795,7 @@ fdcpio(fdc_p fdc, long flags, caddr_t addr, u_int count)
* Try figuring out the density of the media present in our device.
*/
static int
-fdautoselect(dev_t dev)
+fdautoselect(struct cdev *dev)
{
fd_p fd;
struct fd_type *fdtp;
@@ -2492,7 +2492,7 @@ fdbiodone(struct bio *bp)
}
static int
-fdmisccmd(dev_t dev, u_int cmd, void *data)
+fdmisccmd(struct cdev *dev, u_int cmd, void *data)
{
fdu_t fdu;
fd_p fd;
@@ -2543,7 +2543,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data)
}
static int
-fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+fdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
fdu_t fdu;
fd_p fd;
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h
index 5b43387..3c44a55 100644
--- a/sys/dev/firewire/firewirereg.h
+++ b/sys/dev/firewire/firewirereg.h
@@ -72,7 +72,7 @@ struct fw_device{
struct firewire_softc {
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
- dev_t dev;
+ struct cdev *dev;
#endif
struct firewire_comm *fc;
};
@@ -156,7 +156,7 @@ struct firewire_comm{
uint32_t (*cyctimer) (struct firewire_comm *);
void (*ibr) (struct firewire_comm *);
uint32_t (*set_bmr) (struct firewire_comm *, uint32_t);
- int (*ioctl) (dev_t, u_long, caddr_t, int, fw_proc *);
+ int (*ioctl) (struct cdev *, u_long, caddr_t, int, fw_proc *);
int (*irx_enable) (struct firewire_comm *, int);
int (*irx_disable) (struct firewire_comm *, int);
int (*itx_enable) (struct firewire_comm *, int);
@@ -303,7 +303,7 @@ struct fw_bind *fw_bindlookup (struct firewire_comm *, uint16_t, uint32_t);
void fw_drain_txq (struct firewire_comm *);
int fwdev_makedev (struct firewire_softc *);
int fwdev_destroydev (struct firewire_softc *);
-void fwdev_clone (void *, char *, int, dev_t *);
+void fwdev_clone (void *, char *, int, struct cdev **);
extern int firewire_debug;
extern devclass_t firewire_devclass;
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c
index 7cf7dc9..5d10415 100644
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -178,7 +178,7 @@ fwdev_freebuf(struct fw_xferq *q)
static int
-fw_open (dev_t dev, int flags, int fmt, fw_proc *td)
+fw_open (struct cdev *dev, int flags, int fmt, fw_proc *td)
{
int err = 0;
@@ -205,7 +205,7 @@ fw_open (dev_t dev, int flags, int fmt, fw_proc *td)
}
static int
-fw_close (dev_t dev, int flags, int fmt, fw_proc *td)
+fw_close (struct cdev *dev, int flags, int fmt, fw_proc *td)
{
struct firewire_softc *sc;
struct firewire_comm *fc;
@@ -279,7 +279,7 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td)
* read request.
*/
static int
-fw_read (dev_t dev, struct uio *uio, int ioflag)
+fw_read (struct cdev *dev, struct uio *uio, int ioflag)
{
struct firewire_softc *sc;
struct fw_xferq *ir;
@@ -365,7 +365,7 @@ readloop:
}
static int
-fw_write (dev_t dev, struct uio *uio, int ioflag)
+fw_write (struct cdev *dev, struct uio *uio, int ioflag)
{
int err = 0;
struct firewire_softc *sc;
@@ -428,7 +428,7 @@ isoloop:
* ioctl support.
*/
int
-fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
+fw_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
{
struct firewire_softc *sc;
struct firewire_comm *fc;
@@ -728,7 +728,7 @@ out:
return err;
}
int
-fw_poll(dev_t dev, int events, fw_proc *td)
+fw_poll(struct cdev *dev, int events, fw_proc *td)
{
struct firewire_softc *sc;
struct fw_xferq *ir;
@@ -760,9 +760,9 @@ fw_poll(dev_t dev, int events, fw_proc *td)
static int
#if defined(__DragonFly__) || __FreeBSD_version < 500102
-fw_mmap (dev_t dev, vm_offset_t offset, int nproto)
+fw_mmap (struct cdev *dev, vm_offset_t offset, int nproto)
#else
-fw_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
+fw_mmap (struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
#endif
{
struct firewire_softc *sc;
@@ -783,7 +783,7 @@ fw_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
static void
fw_strategy(struct bio *bp)
{
- dev_t dev;
+ struct cdev *dev;
dev = bp->bio_dev;
if (DEV_FWMEM(dev)) {
@@ -805,7 +805,7 @@ fwdev_makedev(struct firewire_softc *sc)
#if defined(__DragonFly__) || __FreeBSD_version < 500000
cdevsw_add(&firewire_cdevsw);
#else
- dev_t d;
+ struct cdev *d;
int unit;
unit = device_get_unit(sc->fc->bdev);
@@ -840,7 +840,7 @@ fwdev_destroydev(struct firewire_softc *sc)
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
#define NDEVTYPE 2
void
-fwdev_clone(void *arg, char *name, int namelen, dev_t *dev)
+fwdev_clone(void *arg, char *name, int namelen, struct cdev **dev)
{
struct firewire_softc *sc;
char *devnames[NDEVTYPE] = {"fw", "fwmem"};
diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c
index c10a078..a2e81e3 100644
--- a/sys/dev/firewire/fwmem.c
+++ b/sys/dev/firewire/fwmem.c
@@ -274,7 +274,7 @@ fwmem_write_block(
int
-fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td)
+fwmem_open (struct cdev *dev, int flags, int fmt, fw_proc *td)
{
struct fwmem_softc *fms;
@@ -300,7 +300,7 @@ fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td)
}
int
-fwmem_close (dev_t dev, int flags, int fmt, fw_proc *td)
+fwmem_close (struct cdev *dev, int flags, int fmt, fw_proc *td)
{
struct fwmem_softc *fms;
@@ -343,7 +343,7 @@ fwmem_strategy(struct bio *bp)
struct fwmem_softc *fms;
struct fw_device *fwdev;
struct fw_xfer *xfer;
- dev_t dev;
+ struct cdev *dev;
int unit, err=0, s, iolen;
dev = bp->bio_dev;
@@ -406,7 +406,7 @@ error:
}
int
-fwmem_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
+fwmem_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
{
struct fwmem_softc *fms;
int err = 0;
@@ -425,15 +425,15 @@ fwmem_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
return(err);
}
int
-fwmem_poll (dev_t dev, int events, fw_proc *td)
+fwmem_poll (struct cdev *dev, int events, fw_proc *td)
{
return EINVAL;
}
int
#if defined(__DragonFly__) || __FreeBSD_version < 500102
-fwmem_mmap (dev_t dev, vm_offset_t offset, int nproto)
+fwmem_mmap (struct cdev *dev, vm_offset_t offset, int nproto)
#else
-fwmem_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
+fwmem_mmap (struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
#endif
{
return EINVAL;
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index c6e58c5..6c99909 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -345,7 +345,7 @@ again:
}
/* Device specific ioctl. */
int
-fwohci_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
+fwohci_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
{
struct firewire_softc *sc;
struct fwohci_softc *fc;
diff --git a/sys/dev/gfb/gfb_pci.c b/sys/dev/gfb/gfb_pci.c
index 7fb3878..3e22978 100644
--- a/sys/dev/gfb/gfb_pci.c
+++ b/sys/dev/gfb/gfb_pci.c
@@ -260,7 +260,7 @@ pcigfb_detach(device_t dev)
#ifdef FB_INSTALL_CDEV
int
-pcigfb_open(dev_t dev, int flag, int mode, struct thread *td)
+pcigfb_open(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct gfb_softc *sc;
int error;
@@ -277,7 +277,7 @@ pcigfb_open(dev_t dev, int flag, int mode, struct thread *td)
}
int
-pcigfb_close(dev_t dev, int flag, int mode, struct thread *td)
+pcigfb_close(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct gfb_softc *sc;
@@ -286,7 +286,7 @@ pcigfb_close(dev_t dev, int flag, int mode, struct thread *td)
}
int
-pcigfb_read(dev_t dev, struct uio *uio, int flag)
+pcigfb_read(struct cdev *dev, struct uio *uio, int flag)
{
struct gfb_softc *sc;
@@ -295,7 +295,7 @@ pcigfb_read(dev_t dev, struct uio *uio, int flag)
}
int
-pcigfb_write(dev_t dev, struct uio *uio, int flag)
+pcigfb_write(struct cdev *dev, struct uio *uio, int flag)
{
struct gfb_softc *sc;
@@ -304,7 +304,7 @@ pcigfb_write(dev_t dev, struct uio *uio, int flag)
}
int
-pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
+pcigfb_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
{
struct gfb_softc *sc;
@@ -313,7 +313,7 @@ pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
}
int
-pcigfb_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
+pcigfb_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
{
struct gfb_softc *sc;
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index 47f27a7..c9682ef 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -575,7 +575,7 @@ struct cmd_info {
static struct cmd_info *ida_cmd_lookup(int);
static int
-ida_ioctl (dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
+ida_ioctl (struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
{
struct ida_softc *sc;
struct ida_user_command *uc;
diff --git a/sys/dev/ida/idavar.h b/sys/dev/ida/idavar.h
index 78993cb..118e680 100644
--- a/sys/dev/ida/idavar.h
+++ b/sys/dev/ida/idavar.h
@@ -126,7 +126,7 @@ struct ida_access {
struct ida_softc {
device_t dev;
int unit;
- dev_t ida_dev_t;
+ struct cdev *ida_dev_t;
int regs_res_type;
int regs_res_id;
diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c
index 37c2b61..3a879d8 100644
--- a/sys/dev/iicbus/iic.c
+++ b/sys/dev/iicbus/iic.c
@@ -52,7 +52,7 @@ struct iic_softc {
char sc_buffer[BUFSIZE]; /* output buffer */
char sc_inbuf[BUFSIZE]; /* input buffer */
- dev_t sc_devnode;
+ struct cdev *sc_devnode;
};
#define IIC_SOFTC(unit) \
@@ -146,7 +146,7 @@ iic_detach(device_t dev)
}
static int
-iicopen (dev_t dev, int flags, int fmt, struct thread *td)
+iicopen (struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct iic_softc *sc = IIC_SOFTC(minor(dev));
@@ -162,7 +162,7 @@ iicopen (dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-iicclose(dev_t dev, int flags, int fmt, struct thread *td)
+iicclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct iic_softc *sc = IIC_SOFTC(minor(dev));
@@ -181,7 +181,7 @@ iicclose(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-iicwrite(dev_t dev, struct uio * uio, int ioflag)
+iicwrite(struct cdev *dev, struct uio * uio, int ioflag)
{
device_t iicdev = IIC_DEVICE(minor(dev));
struct iic_softc *sc = IIC_SOFTC(minor(dev));
@@ -208,7 +208,7 @@ iicwrite(dev_t dev, struct uio * uio, int ioflag)
}
static int
-iicread(dev_t dev, struct uio * uio, int ioflag)
+iicread(struct cdev *dev, struct uio * uio, int ioflag)
{
device_t iicdev = IIC_DEVICE(minor(dev));
struct iic_softc *sc = IIC_SOFTC(minor(dev));
@@ -240,7 +240,7 @@ iicread(dev_t dev, struct uio * uio, int ioflag)
}
static int
-iicioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+iicioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
device_t iicdev = IIC_DEVICE(minor(dev));
struct iic_softc *sc = IIC_SOFTC(minor(dev));
diff --git a/sys/dev/iir/iir.h b/sys/dev/iir/iir.h
index 44c4cf5..688cf63 100644
--- a/sys/dev/iir/iir.h
+++ b/sys/dev/iir/iir.h
@@ -602,7 +602,7 @@ struct gdt_softc {
#define GDT_POLLING 0x01
#define GDT_SHUTDOWN 0x02
#define GDT_POLL_WAIT 0x80
- dev_t sc_dev;
+ struct cdev *sc_dev;
bus_space_tag_t sc_dpmemt;
bus_space_handle_t sc_dpmemh;
bus_addr_t sc_dpmembase;
@@ -746,8 +746,8 @@ gdt_dec32(addr)
extern TAILQ_HEAD(gdt_softc_list, gdt_softc) gdt_softcs;
extern u_int8_t gdt_polling;
-dev_t gdt_make_dev(int unit);
-void gdt_destroy_dev(dev_t dev);
+struct cdev *gdt_make_dev(int unit);
+void gdt_destroy_dev(struct cdev *dev);
void gdt_next(struct gdt_softc *gdt);
void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb);
diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c
index 87275b5..4d976b3 100644
--- a/sys/dev/iir/iir_ctrl.c
+++ b/sys/dev/iir/iir_ctrl.c
@@ -95,10 +95,10 @@ extern gdt_statist_t gdt_stat;
* Given a controller number,
* make a special device and return the dev_t
*/
-dev_t
+struct cdev *
gdt_make_dev(int unit)
{
- dev_t dev;
+ struct cdev *dev;
#ifdef SDEV_PER_HBA
dev = make_dev(&iir_cdevsw, hba2minor(unit), UID_ROOT, GID_OPERATOR,
@@ -114,7 +114,7 @@ gdt_make_dev(int unit)
}
void
-gdt_destroy_dev(dev_t dev)
+gdt_destroy_dev(struct cdev *dev)
{
if (dev != NULL)
destroy_dev(dev);
@@ -144,7 +144,7 @@ gdt_minor2softc(int minor_no)
}
static int
-iir_open(dev_t dev, int flags, int fmt, d_thread_t * p)
+iir_open(struct cdev *dev, int flags, int fmt, d_thread_t * p)
{
GDT_DPRINTF(GDT_D_DEBUG, ("iir_open()\n"));
@@ -162,7 +162,7 @@ iir_open(dev_t dev, int flags, int fmt, d_thread_t * p)
}
static int
-iir_close(dev_t dev, int flags, int fmt, d_thread_t * p)
+iir_close(struct cdev *dev, int flags, int fmt, d_thread_t * p)
{
GDT_DPRINTF(GDT_D_DEBUG, ("iir_close()\n"));
@@ -180,7 +180,7 @@ iir_close(dev_t dev, int flags, int fmt, d_thread_t * p)
}
static int
-iir_write(dev_t dev, struct uio * uio, int ioflag)
+iir_write(struct cdev *dev, struct uio * uio, int ioflag)
{
GDT_DPRINTF(GDT_D_DEBUG, ("iir_write()\n"));
@@ -198,7 +198,7 @@ iir_write(dev_t dev, struct uio * uio, int ioflag)
}
static int
-iir_read(dev_t dev, struct uio * uio, int ioflag)
+iir_read(struct cdev *dev, struct uio * uio, int ioflag)
{
GDT_DPRINTF(GDT_D_DEBUG, ("iir_read()\n"));
@@ -222,7 +222,7 @@ iir_read(dev_t dev, struct uio * uio, int ioflag)
*/
static int
-iir_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p)
+iir_ioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p)
{
GDT_DPRINTF(GDT_D_DEBUG, ("iir_ioctl() cmd 0x%lx\n",cmd));
diff --git a/sys/dev/ips/ips.c b/sys/dev/ips/ips.c
index b2532e9..b1a8297 100644
--- a/sys/dev/ips/ips.c
+++ b/sys/dev/ips/ips.c
@@ -68,14 +68,14 @@ static const char* ips_adapter_name[] = {
};
-static int ips_open(dev_t dev, int flags, int fmt, struct thread *td)
+static int ips_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
ips_softc_t *sc = dev->si_drv1;
sc->state |= IPS_DEV_OPEN;
return 0;
}
-static int ips_close(dev_t dev, int flags, int fmt, struct thread *td)
+static int ips_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
ips_softc_t *sc = dev->si_drv1;
sc->state &= ~IPS_DEV_OPEN;
@@ -83,7 +83,7 @@ static int ips_close(dev_t dev, int flags, int fmt, struct thread *td)
return 0;
}
-static int ips_ioctl(dev_t dev, u_long command, caddr_t addr, int32_t flags, struct thread *td)
+static int ips_ioctl(struct cdev *dev, u_long command, caddr_t addr, int32_t flags, struct thread *td)
{
ips_softc_t *sc;
diff --git a/sys/dev/ips/ips.h b/sys/dev/ips/ips.h
index 5fd7514..9c26a7a 100644
--- a/sys/dev/ips/ips.h
+++ b/sys/dev/ips/ips.h
@@ -414,7 +414,7 @@ typedef struct ips_softc{
bus_dma_tag_t command_dmatag;
bus_dma_tag_t sg_dmatag;
device_t dev;
- dev_t device_file;
+ struct cdev *device_file;
struct callout_handle timer;
u_int16_t adapter_type;
ips_adapter_info_t adapter_info;
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index c7f908f..9845078 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -238,7 +238,7 @@ isp_freeze_loopdown(struct ispsoftc *isp, char *msg)
}
static int
-ispioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
+ispioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
{
struct ispsoftc *isp;
int nr, retval = ENOTTY;
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index 0b4efe7..0568feb 100644
--- a/sys/dev/joy/joy.c
+++ b/sys/dev/joy/joy.c
@@ -128,7 +128,7 @@ joy_detach(device_t dev)
static int
-joyopen(dev_t dev, int flags, int fmt, struct thread *td)
+joyopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int i = joypart (dev);
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
@@ -141,7 +141,7 @@ joyopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-joyclose(dev_t dev, int flags, int fmt, struct thread *td)
+joyclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int i = joypart (dev);
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
@@ -151,7 +151,7 @@ joyclose(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-joyread(dev_t dev, struct uio *uio, int flag)
+joyread(struct cdev *dev, struct uio *uio, int flag)
{
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
bus_space_handle_t port = joy->port;
@@ -209,7 +209,7 @@ joyread(dev_t dev, struct uio *uio, int flag)
}
static int
-joyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+joyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
int i = joypart (dev);
diff --git a/sys/dev/joy/joyvar.h b/sys/dev/joy/joyvar.h
index 7fd1c13..966fe78 100644
--- a/sys/dev/joy/joyvar.h
+++ b/sys/dev/joy/joyvar.h
@@ -35,7 +35,7 @@ struct joy_softc {
int timeout[2];
struct resource *res;
int rid;
- dev_t d;
+ struct cdev *d;
};
int joy_probe(device_t);
diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c
index 0f1f571..b7694c5 100644
--- a/sys/dev/kbd/kbd.c
+++ b/sys/dev/kbd/kbd.c
@@ -489,7 +489,7 @@ kbd_detach(keyboard_t *kbd)
static kbd_callback_func_t genkbd_event;
static int
-genkbdopen(dev_t dev, int mode, int flag, struct thread *td)
+genkbdopen(struct cdev *dev, int mode, int flag, struct thread *td)
{
keyboard_t *kbd;
genkbd_softc_t *sc;
@@ -527,7 +527,7 @@ genkbdopen(dev_t dev, int mode, int flag, struct thread *td)
}
static int
-genkbdclose(dev_t dev, int mode, int flag, struct thread *td)
+genkbdclose(struct cdev *dev, int mode, int flag, struct thread *td)
{
keyboard_t *kbd;
genkbd_softc_t *sc;
@@ -553,7 +553,7 @@ genkbdclose(dev_t dev, int mode, int flag, struct thread *td)
}
static int
-genkbdread(dev_t dev, struct uio *uio, int flag)
+genkbdread(struct cdev *dev, struct uio *uio, int flag)
{
keyboard_t *kbd;
genkbd_softc_t *sc;
@@ -606,7 +606,7 @@ genkbdread(dev_t dev, struct uio *uio, int flag)
}
static int
-genkbdwrite(dev_t dev, struct uio *uio, int flag)
+genkbdwrite(struct cdev *dev, struct uio *uio, int flag)
{
keyboard_t *kbd;
@@ -617,7 +617,7 @@ genkbdwrite(dev_t dev, struct uio *uio, int flag)
}
static int
-genkbdioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
+genkbdioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
{
keyboard_t *kbd;
int error;
@@ -632,7 +632,7 @@ genkbdioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
}
static int
-genkbdpoll(dev_t dev, int events, struct thread *td)
+genkbdpoll(struct cdev *dev, int events, struct thread *td)
{
keyboard_t *kbd;
genkbd_softc_t *sc;
diff --git a/sys/dev/kbd/kbdreg.h b/sys/dev/kbd/kbdreg.h
index 05fb895..78a5af4 100644
--- a/sys/dev/kbd/kbdreg.h
+++ b/sys/dev/kbd/kbdreg.h
@@ -90,7 +90,7 @@ struct keyboard {
#define KB_DELAY2 100
unsigned long kb_count; /* # of processed key strokes */
u_char kb_lastact[NUM_KEYS/2];
- dev_t kb_dev;
+ struct cdev *kb_dev;
};
#define KBD_IS_VALID(k) ((k)->kb_flags & KB_VALID)
diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c
index 5160a05..4c19e27 100644
--- a/sys/dev/led/led.c
+++ b/sys/dev/led/led.c
@@ -26,7 +26,7 @@ struct ledsc {
LIST_ENTRY(ledsc) list;
void *private;
led_t *func;
- dev_t dev;
+ struct cdev *dev;
struct sbuf *spec;
char *str;
char *ptr;
@@ -72,7 +72,7 @@ led_timeout(void *p)
}
static int
-led_write(dev_t dev, struct uio *uio, int ioflag)
+led_write(struct cdev *dev, struct uio *uio, int ioflag)
{
int error;
char *s, *s2;
@@ -221,7 +221,7 @@ static struct cdevsw led_cdevsw = {
.d_name = "LED",
};
-dev_t
+struct cdev *
led_create(led_t *func, void *priv, char const *name)
{
struct ledsc *sc;
@@ -259,7 +259,7 @@ led_create(led_t *func, void *priv, char const *name)
}
void
-led_destroy(dev_t dev)
+led_destroy(struct cdev *dev)
{
struct ledsc *sc;
diff --git a/sys/dev/led/led.h b/sys/dev/led/led.h
index 6880efd..866311b 100644
--- a/sys/dev/led/led.h
+++ b/sys/dev/led/led.h
@@ -14,7 +14,7 @@
typedef void led_t(void *, int);
-dev_t led_create(led_t *, void *, char const *);
-void led_destroy(dev_t);
+struct cdev *led_create(led_t *, void *, char const *);
+void led_destroy(struct cdev *);
#endif
diff --git a/sys/dev/matcd/matcd.c b/sys/dev/matcd/matcd.c
index 9e28d25..aead16c 100644
--- a/sys/dev/matcd/matcd.c
+++ b/sys/dev/matcd/matcd.c
@@ -624,7 +624,7 @@ struct matcd_mbx {
static struct matcd_data {
device_t dev;
- dev_t matcd_dev_t;
+ struct cdev *matcd_dev_t;
short config;
short drivemode; /*Last state drive was set to*/
short flags;
@@ -657,8 +657,8 @@ static unsigned char if_state[4]={0,0,0,0}; /*State of host I/F and bus*/
int matcd_probe(struct matcd_softc *sc);
int matcd_attach(struct matcd_softc *sc);
-static int matcdopen(dev_t dev, int flags, int fmt, struct thread *ptx);
-static int matcdclose(dev_t dev, int flags, int fmt, struct thread *ptx);
+static int matcdopen(struct cdev *dev, int flags, int fmt, struct thread *ptx);
+static int matcdclose(struct cdev *dev, int flags, int fmt, struct thread *ptx);
static void matcdstrategy(struct bio *bp);
static d_ioctl_t matcdioctl;
static timeout_t matcd_timeout;
@@ -668,7 +668,7 @@ static timeout_t matcd_timeout;
Internal function declarations
---------------------------------------------------------------------------*/
-static int matcdsize(dev_t dev);
+static int matcdsize(struct cdev *dev);
static void matcd_start(struct bio_queue_head *dp);
static void zero_cmd(char *);
static void matcd_pread(int port, int count, unsigned char * data);
@@ -772,7 +772,7 @@ int matcd_attach(struct matcd_softc *sc)
unsigned char data[12];
struct matcd_data *cd;
int port = sc->port_bsh; /*Take port ID selected in probe()*/
- dev_t d;
+ struct cdev *d;
int unit=0;
printf("matcdc%d: Host interface type %d port %x\n",
@@ -864,7 +864,7 @@ int matcd_attach(struct matcd_softc *sc)
<15> If LOCKDRIVE is enabled, additional minor number devices allow
<15> the drive to be locked while being accessed.
---------------------------------------------------------------------------*/
-static int matcdopen(dev_t dev, int flags, int fmt,
+static int matcdopen(struct cdev *dev, int flags, int fmt,
struct thread *ptx)
{
int cdrive,ldrive,partition,controller,lock;
@@ -1051,7 +1051,7 @@ static int matcdopen(dev_t dev, int flags, int fmt,
the drive. See Edit 15 in Edit History.
---------------------------------------------------------------------------*/
-static int matcdclose(dev_t dev, int flags, int fmt,struct thread *ptx)
+static int matcdclose(struct cdev *dev, int flags, int fmt,struct thread *ptx)
{
int ldrive,cdrive,port,partition,controller,lock;
struct matcd_data *cd;
@@ -1910,7 +1910,7 @@ static void matcd_start(struct bio_queue_head *dp)
things that don't fit into the block read scheme of things.
---------------------------------------------------------------------------*/
-static int matcdioctl(dev_t dev, unsigned long command,
+static int matcdioctl(struct cdev *dev, unsigned long command,
caddr_t addr, int flags,
struct thread *td)
{
@@ -2051,7 +2051,7 @@ static int matcdioctl(dev_t dev, unsigned long command,
matcdsize - Reports how many blocks exist on the disc.
---------------------------------------------------------------------------*/
-static int matcdsize(dev_t dev)
+static int matcdsize(struct cdev *dev)
{
int size,blksize;
int ldrive,part;
diff --git a/sys/dev/matcd/matcd_data.h b/sys/dev/matcd/matcd_data.h
index 381599a..1923cec 100644
--- a/sys/dev/matcd/matcd_data.h
+++ b/sys/dev/matcd/matcd_data.h
@@ -50,7 +50,7 @@ See matcd.c for Edit History
struct matcd_softc {
device_t dev;
- dev_t matcd_dev_t;
+ struct cdev *matcd_dev_t;
struct resource * port;
int port_rid;
int port_type;
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index ebc233e..4f09744 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -153,7 +153,7 @@ static int mcd_pause(struct mcd_softc *);
static int mcd_resume(struct mcd_softc *);
static int mcd_lock_door(struct mcd_softc *, int lock);
static int mcd_close_tray(struct mcd_softc *);
-static int mcd_size(dev_t dev);
+static int mcd_size(struct cdev *dev);
static d_open_t mcdopen;
static d_close_t mcdclose;
@@ -211,7 +211,7 @@ mcd_attach(struct mcd_softc *sc)
}
static int
-mcdopen(dev_t dev, int flags, int fmt, struct thread *td)
+mcdopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct mcd_softc *sc;
int r,retry;
@@ -271,7 +271,7 @@ mcdopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-mcdclose(dev_t dev, int flags, int fmt, struct thread *td)
+mcdclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct mcd_softc *sc;
@@ -368,7 +368,7 @@ mcd_start(struct mcd_softc *sc)
}
static int
-mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
+mcdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
{
struct mcd_softc *sc;
int retry,r;
@@ -466,7 +466,7 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd);
}
static int
-mcd_size(dev_t dev)
+mcd_size(struct cdev *dev)
{
struct mcd_softc *sc;
int size;
diff --git a/sys/dev/mcd/mcdvar.h b/sys/dev/mcd/mcdvar.h
index 9f81ced..adfd4a4 100644
--- a/sys/dev/mcd/mcdvar.h
+++ b/sys/dev/mcd/mcdvar.h
@@ -35,7 +35,7 @@ struct mcd_data {
struct mcd_softc {
device_t dev;
- dev_t mcd_dev_t;
+ struct cdev *mcd_dev_t;
int debug;
struct resource * port;
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 4b680d7..295d8d2 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -107,7 +107,7 @@ static u_char end_mfs_root[] __unused = "MFS Filesystem had better STOP here";
static g_init_t md_drvinit;
static int mdunits;
-static dev_t status_dev = 0;
+static struct cdev *status_dev = 0;
static d_ioctl_t mdctlioctl;
@@ -137,7 +137,7 @@ struct md_s {
LIST_ENTRY(md_s) list;
struct bio_queue_head bio_queue;
struct mtx queue_mtx;
- dev_t dev;
+ struct cdev *dev;
enum md_types type;
unsigned nsect;
unsigned opencount;
@@ -1078,7 +1078,7 @@ mddetach(int unit, struct thread *td)
}
static int
-mdctlioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
+mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
{
struct md_ioctl *mdio;
struct md_s *sc;
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index bf7b8cd..f026175 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -204,7 +204,7 @@ mlx_free(struct mlx_softc *sc)
free(sc->mlx_enq2, M_DEVBUF);
/* destroy control device */
- if (sc->mlx_dev_t != (dev_t)NULL)
+ if (sc->mlx_dev_t != (struct cdev *)NULL)
destroy_dev(sc->mlx_dev_t);
}
@@ -721,7 +721,7 @@ mlx_submit_buf(struct mlx_softc *sc, mlx_bio *bp)
* Accept an open operation on the control device.
*/
int
-mlx_open(dev_t dev, int flags, int fmt, struct thread *td)
+mlx_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int unit = minor(dev);
struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit);
@@ -734,7 +734,7 @@ mlx_open(dev_t dev, int flags, int fmt, struct thread *td)
* Accept the last close on the control device.
*/
int
-mlx_close(dev_t dev, int flags, int fmt, struct thread *td)
+mlx_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int unit = minor(dev);
struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit);
@@ -747,7 +747,7 @@ mlx_close(dev_t dev, int flags, int fmt, struct thread *td)
* Handle controller-specific control operations.
*/
int
-mlx_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
+mlx_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
{
int unit = minor(dev);
struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit);
diff --git a/sys/dev/mlx/mlxvar.h b/sys/dev/mlx/mlxvar.h
index e499569..345cf99 100644
--- a/sys/dev/mlx/mlxvar.h
+++ b/sys/dev/mlx/mlxvar.h
@@ -108,7 +108,7 @@ struct mlx_softc
{
/* bus connections */
device_t mlx_dev;
- dev_t mlx_dev_t;
+ struct cdev *mlx_dev_t;
struct resource *mlx_mem; /* mailbox interface window */
int mlx_mem_rid;
int mlx_mem_type;
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index eb035d0..2e36816 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -2826,7 +2826,7 @@ mly_print_controller(int controller)
* Accept an open operation on the control device.
*/
static int
-mly_user_open(dev_t dev, int flags, int fmt, struct thread *td)
+mly_user_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int unit = minor(dev);
struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit);
@@ -2839,7 +2839,7 @@ mly_user_open(dev_t dev, int flags, int fmt, struct thread *td)
* Accept the last close on the control device.
*/
static int
-mly_user_close(dev_t dev, int flags, int fmt, struct thread *td)
+mly_user_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int unit = minor(dev);
struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit);
@@ -2852,7 +2852,7 @@ mly_user_close(dev_t dev, int flags, int fmt, struct thread *td)
* Handle controller-specific control operations.
*/
static int
-mly_user_ioctl(dev_t dev, u_long cmd, caddr_t addr,
+mly_user_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
int32_t flag, struct thread *td)
{
struct mly_softc *sc = (struct mly_softc *)dev->si_drv1;
diff --git a/sys/dev/mly/mlyvar.h b/sys/dev/mly/mlyvar.h
index c994d42..e1c7a50 100644
--- a/sys/dev/mly/mlyvar.h
+++ b/sys/dev/mly/mlyvar.h
@@ -165,7 +165,7 @@ struct mly_command {
struct mly_softc {
/* bus connections */
device_t mly_dev;
- dev_t mly_dev_t;
+ struct cdev *mly_dev_t;
struct resource *mly_regs_resource; /* register interface window */
int mly_regs_rid; /* resource ID */
bus_space_handle_t mly_bhandle; /* bus space handle */
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index ddc0742..31c85f8 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -96,8 +96,8 @@ typedef struct mse_softc {
u_char sc_bytes[MOUSE_SYS_PACKETSIZE];
struct callout_handle sc_callout;
int sc_watchdog;
- dev_t sc_dev;
- dev_t sc_ndev;
+ struct cdev *sc_dev;
+ struct cdev *sc_ndev;
mousehw_t hw;
mousemode_t mode;
mousestatus_t status;
@@ -386,7 +386,7 @@ mse_detach(dev)
*/
static int
mseopen(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -426,7 +426,7 @@ mseopen(dev, flags, fmt, td)
*/
static int
mseclose(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -450,7 +450,7 @@ mseclose(dev, flags, fmt, td)
*/
static int
mseread(dev, uio, ioflag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int ioflag;
{
@@ -517,7 +517,7 @@ mseread(dev, uio, ioflag)
*/
static int
mseioctl(dev, cmd, addr, flag, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t addr;
int flag;
@@ -634,7 +634,7 @@ mseioctl(dev, cmd, addr, flag, td)
*/
static int
msepoll(dev, events, td)
- dev_t dev;
+ struct cdev *dev;
int events;
struct thread *td;
{
@@ -667,10 +667,10 @@ static void
msetimeout(arg)
void *arg;
{
- dev_t dev;
+ struct cdev *dev;
mse_softc_t *sc;
- dev = (dev_t)arg;
+ dev = (struct cdev *)arg;
sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev));
if (sc->sc_watchdog) {
if (bootverbose)
diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c
index cb25ecb..683d06b 100644
--- a/sys/dev/nmdm/nmdm.c
+++ b/sys/dev/nmdm/nmdm.c
@@ -57,7 +57,7 @@ MALLOC_DEFINE(M_NLMDM, "nullmodem", "nullmodem data structures");
static void nmdmstart(struct tty *tp);
static void nmdmstop(struct tty *tp, int rw);
-static void nmdminit(dev_t dev);
+static void nmdminit(struct cdev *dev);
static d_open_t nmdmopen;
static d_close_t nmdmclose;
@@ -77,7 +77,7 @@ static struct cdevsw nmdm_cdevsw = {
struct softpart {
struct tty *nm_tty;
- dev_t dev;
+ struct cdev *dev;
int dcd;
struct task pt_task;
struct softpart *other;
@@ -94,11 +94,11 @@ static struct clonedevs *nmdmclones;
static TAILQ_HEAD(,nm_softc) nmdmhead = TAILQ_HEAD_INITIALIZER(nmdmhead);
static void
-nmdm_clone(void *arg, char *name, int nameen, dev_t *dev)
+nmdm_clone(void *arg, char *name, int nameen, struct cdev **dev)
{
int i, unit;
char *p;
- dev_t d1, d2;
+ struct cdev *d1, *d2;
if (*dev != NODEV)
return;
@@ -179,9 +179,9 @@ nmdm_task_tty(void *arg, int pending __unused)
* This function creates and initializes a pair of ttys.
*/
static void
-nmdminit(dev_t dev1)
+nmdminit(struct cdev *dev1)
{
- dev_t dev2;
+ struct cdev *dev2;
struct nm_softc *pt;
dev2 = dev1->si_drv2;
@@ -225,7 +225,7 @@ nmdminit(dev_t dev1)
* Device opened from userland
*/
static int
-nmdmopen(dev_t dev, int flag, int devtype, struct thread *td)
+nmdmopen(struct cdev *dev, int flag, int devtype, struct thread *td)
{
struct tty *tp, *tp2;
int error;
@@ -260,7 +260,7 @@ nmdmopen(dev_t dev, int flag, int devtype, struct thread *td)
}
static int
-nmdmclose(dev_t dev, int flag, int mode, struct thread *td)
+nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td)
{
return (ttyclose(dev->si_tty));
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index 314f460..710d4b1 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -40,8 +40,8 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
/* For use with destroy_dev(9). */
-static dev_t null_dev;
-static dev_t zero_dev;
+static struct cdev *null_dev;
+static struct cdev *zero_dev;
static d_write_t null_write;
static d_ioctl_t null_ioctl;
@@ -73,7 +73,7 @@ static void *zbuf;
/* ARGSUSED */
static int
-null_write(dev_t dev __unused, struct uio *uio, int flags __unused)
+null_write(struct cdev *dev __unused, struct uio *uio, int flags __unused)
{
uio->uio_resid = 0;
return 0;
@@ -81,7 +81,7 @@ null_write(dev_t dev __unused, struct uio *uio, int flags __unused)
/* ARGSUSED */
static int
-null_ioctl(dev_t dev __unused, u_long cmd, caddr_t data __unused,
+null_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused,
int flags __unused, struct thread *td)
{
int error;
@@ -96,7 +96,7 @@ null_ioctl(dev_t dev __unused, u_long cmd, caddr_t data __unused,
/* ARGSUSED */
static int
-zero_read(dev_t dev __unused, struct uio *uio, int flags __unused)
+zero_read(struct cdev *dev __unused, struct uio *uio, int flags __unused)
{
int c;
int error = 0;
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c
index a16f58d..5ee5914 100644
--- a/sys/dev/ofw/ofw_console.c
+++ b/sys/dev/ofw/ofw_console.c
@@ -83,7 +83,7 @@ cn_drvinit(void *unused)
{
phandle_t options;
char output[32];
- dev_t dev;
+ struct cdev *dev;
if (ofw_consdev.cn_pri != CN_DEAD &&
ofw_consdev.cn_name[0] != '\0') {
@@ -103,7 +103,7 @@ static int stdin;
static int stdout;
static int
-ofw_dev_open(dev_t dev, int flag, int mode, struct thread *td)
+ofw_dev_open(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct tty *tp;
int unit;
@@ -150,7 +150,7 @@ ofw_dev_open(dev_t dev, int flag, int mode, struct thread *td)
}
static int
-ofw_dev_close(dev_t dev, int flag, int mode, struct thread *td)
+ofw_dev_close(struct cdev *dev, int flag, int mode, struct thread *td)
{
int unit;
struct tty *tp;
diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c
index adb3929..4839428 100644
--- a/sys/dev/ofw/openfirmio.c
+++ b/sys/dev/ofw/openfirmio.c
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ofw/openfirmio.h>
-static dev_t openfirm_dev;
+static struct cdev *openfirm_dev;
static d_ioctl_t openfirm_ioctl;
@@ -108,7 +108,7 @@ openfirm_getstr(int len, const char *user, char **cpp)
}
int
-openfirm_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags,
+openfirm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags,
struct thread *td)
{
struct ofiocdesc *of;
diff --git a/sys/dev/ofw/openpromio.c b/sys/dev/ofw/openpromio.c
index 5bf5e69..3182bff 100644
--- a/sys/dev/ofw/openpromio.c
+++ b/sys/dev/ofw/openpromio.c
@@ -67,11 +67,11 @@ static struct cdevsw openprom_cdevsw = {
};
static int openprom_is_open;
-static dev_t openprom_dev;
+static struct cdev *openprom_dev;
static phandle_t openprom_node;
static int
-openprom_open(dev_t dev, int oflags, int devtype, struct thread *td)
+openprom_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
if (openprom_is_open != 0)
@@ -81,7 +81,7 @@ openprom_open(dev_t dev, int oflags, int devtype, struct thread *td)
}
static int
-openprom_close(dev_t dev, int fflag, int devtype, struct thread *td)
+openprom_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
{
openprom_is_open = 0;
@@ -89,7 +89,7 @@ openprom_close(dev_t dev, int fflag, int devtype, struct thread *td)
}
static int
-openprom_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags,
+openprom_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags,
struct thread *td)
{
struct openpromio *oprom;
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index f993135..0917ac5 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1783,7 +1783,7 @@ pci_assign_interrupt_method(device_t dev, device_t child)
static int
pci_modevent(module_t mod, int what, void *arg)
{
- static dev_t pci_cdev;
+ static struct cdev *pci_cdev;
switch (what) {
case MOD_LOAD:
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index 0ce8da9..b14abe1 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -84,7 +84,7 @@ struct cdevsw pcicdev = {
};
static int
-pci_open(dev_t dev, int oflags, int devtype, struct thread *td)
+pci_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
int error;
@@ -98,7 +98,7 @@ pci_open(dev_t dev, int oflags, int devtype, struct thread *td)
}
static int
-pci_close(dev_t dev, int flag, int devtype, struct thread *td)
+pci_close(struct cdev *dev, int flag, int devtype, struct thread *td)
{
return 0;
}
@@ -171,7 +171,7 @@ pci_conf_match(struct pci_match_conf *matches, int num_matches,
}
static int
-pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
device_t pci, pcib;
struct pci_io *io;
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index 7855e36..f3f2c1d 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -455,7 +455,7 @@ lptout(void *arg)
*/
static int
-lptopen(dev_t dev, int flags, int fmt, struct thread *td)
+lptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int s;
int trys, err;
@@ -575,7 +575,7 @@ lptopen(dev_t dev, int flags, int fmt, struct thread *td)
*/
static int
-lptclose(dev_t dev, int flags, int fmt, struct thread *td)
+lptclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
u_int unit = LPTUNIT(minor(dev));
struct lpt_data *sc = UNITOSOFTC(unit);
@@ -684,7 +684,7 @@ lpt_pushbytes(device_t dev)
*/
static int
-lptread(dev_t dev, struct uio *uio, int ioflag)
+lptread(struct cdev *dev, struct uio *uio, int ioflag)
{
u_int unit = LPTUNIT(minor(dev));
struct lpt_data *sc = UNITOSOFTC(unit);
@@ -729,7 +729,7 @@ error:
*/
static int
-lptwrite(dev_t dev, struct uio *uio, int ioflag)
+lptwrite(struct cdev *dev, struct uio *uio, int ioflag)
{
register unsigned n;
int err;
@@ -897,7 +897,7 @@ lptintr(device_t dev)
}
static int
-lptioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+lptioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
int error = 0;
u_int unit = LPTUNIT(minor(dev));
diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c
index 599d255..0219220 100644
--- a/sys/dev/ppbus/pcfclock.c
+++ b/sys/dev/ppbus/pcfclock.c
@@ -152,7 +152,7 @@ pcfclock_attach(device_t dev)
}
static int
-pcfclock_open(dev_t dev, int flag, int fms, struct thread *td)
+pcfclock_open(struct cdev *dev, int flag, int fms, struct thread *td)
{
u_int unit = minor(dev);
struct pcfclock_data *sc = UNITOSOFTC(unit);
@@ -173,7 +173,7 @@ pcfclock_open(dev_t dev, int flag, int fms, struct thread *td)
}
static int
-pcfclock_close(dev_t dev, int flags, int fmt, struct thread *td)
+pcfclock_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
u_int unit = minor(dev);
struct pcfclock_data *sc = UNITOSOFTC(unit);
@@ -188,7 +188,7 @@ pcfclock_close(dev_t dev, int flags, int fmt, struct thread *td)
}
static void
-pcfclock_write_cmd(dev_t dev, unsigned char command)
+pcfclock_write_cmd(struct cdev *dev, unsigned char command)
{
u_int unit = minor(dev);
device_t ppidev = UNITODEVICE(unit);
@@ -208,7 +208,7 @@ pcfclock_write_cmd(dev_t dev, unsigned char command)
}
static void
-pcfclock_display_data(dev_t dev, char buf[18])
+pcfclock_display_data(struct cdev *dev, char buf[18])
{
u_int unit = minor(dev);
#ifdef PCFCLOCK_VERBOSE
@@ -232,7 +232,7 @@ pcfclock_display_data(dev_t dev, char buf[18])
}
static int
-pcfclock_read_data(dev_t dev, char *buf, ssize_t bits)
+pcfclock_read_data(struct cdev *dev, char *buf, ssize_t bits)
{
u_int unit = minor(dev);
device_t ppidev = UNITODEVICE(unit);
@@ -271,7 +271,7 @@ pcfclock_read_data(dev_t dev, char *buf, ssize_t bits)
}
static int
-pcfclock_read_dev(dev_t dev, char *buf, int maxretries)
+pcfclock_read_dev(struct cdev *dev, char *buf, int maxretries)
{
u_int unit = minor(dev);
device_t ppidev = UNITODEVICE(unit);
@@ -301,7 +301,7 @@ pcfclock_read_dev(dev_t dev, char *buf, int maxretries)
}
static int
-pcfclock_read(dev_t dev, struct uio *uio, int ioflag)
+pcfclock_read(struct cdev *dev, struct uio *uio, int ioflag)
{
u_int unit = minor(dev);
char buf[18];
diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c
index 113448d..b537c88 100644
--- a/sys/dev/ppbus/ppi.c
+++ b/sys/dev/ppbus/ppi.c
@@ -255,7 +255,7 @@ ppiintr(void *arg)
#endif /* PERIPH_1284 */
static int
-ppiopen(dev_t dev, int flags, int fmt, struct thread *td)
+ppiopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
u_int unit = minor(dev);
struct ppi_data *ppi = UNITOSOFTC(unit);
@@ -288,7 +288,7 @@ ppiopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-ppiclose(dev_t dev, int flags, int fmt, struct thread *td)
+ppiclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
u_int unit = minor(dev);
struct ppi_data *ppi = UNITOSOFTC(unit);
@@ -330,7 +330,7 @@ ppiclose(dev_t dev, int flags, int fmt, struct thread *td)
* If no data is available, wait for it otherwise transfer as much as possible
*/
static int
-ppiread(dev_t dev, struct uio *uio, int ioflag)
+ppiread(struct cdev *dev, struct uio *uio, int ioflag)
{
#ifdef PERIPH_1284
u_int unit = minor(dev);
@@ -414,7 +414,7 @@ error:
* Once negotiation done, transfer data
*/
static int
-ppiwrite(dev_t dev, struct uio *uio, int ioflag)
+ppiwrite(struct cdev *dev, struct uio *uio, int ioflag)
{
#ifdef PERIPH_1284
u_int unit = minor(dev);
@@ -501,7 +501,7 @@ error:
}
static int
-ppiioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+ppiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
u_int unit = minor(dev);
device_t ppidev = UNITODEVICE(unit);
diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c
index fef6157..2b86cd7 100644
--- a/sys/dev/ppbus/pps.c
+++ b/sys/dev/ppbus/pps.c
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
struct pps_data {
struct ppb_device pps_dev;
struct pps_state pps[9];
- dev_t devs[9];
+ struct cdev *devs[9];
device_t ppsdev;
device_t ppbus;
int busy;
@@ -106,7 +106,7 @@ ppsattach(device_t dev)
{
struct pps_data *sc = DEVTOSOFTC(dev);
device_t ppbus = device_get_parent(dev);
- dev_t d;
+ struct cdev *d;
intptr_t irq;
int i, unit, zero = 0;
@@ -191,7 +191,7 @@ ppsattach(device_t dev)
}
static int
-ppsopen(dev_t dev, int flags, int fmt, struct thread *td)
+ppsopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct pps_data *sc = dev->si_drv1;
int subdev = (intptr_t)dev->si_drv2;
@@ -227,7 +227,7 @@ ppsopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-ppsclose(dev_t dev, int flags, int fmt, struct thread *td)
+ppsclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct pps_data *sc = dev->si_drv1;
int subdev = (intptr_t)dev->si_drv2;
@@ -293,7 +293,7 @@ ppsintr(void *arg)
}
static int
-ppsioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+ppsioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
struct pps_data *sc = dev->si_drv1;
int subdev = (intptr_t)dev->si_drv2;
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index e6727ee..a88e4a9 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -74,7 +74,7 @@ static struct cdevsw random_cdevsw = {
struct random_systat random_systat;
/* For use with make_dev(9)/destroy_dev(9). */
-static dev_t random_dev;
+static struct cdev *random_dev;
/* Used to fake out unused random calls in random_systat */
void
@@ -84,7 +84,7 @@ random_null_func(void)
/* ARGSUSED */
static int
-random_close(dev_t dev __unused, int flags, int fmt __unused,
+random_close(struct cdev *dev __unused, int flags, int fmt __unused,
struct thread *td)
{
if ((flags & FWRITE) && (suser(td) == 0)
@@ -98,7 +98,7 @@ random_close(dev_t dev __unused, int flags, int fmt __unused,
/* ARGSUSED */
static int
-random_read(dev_t dev __unused, struct uio *uio, int flag)
+random_read(struct cdev *dev __unused, struct uio *uio, int flag)
{
int c, error = 0;
void *random_buf;
@@ -136,7 +136,7 @@ random_read(dev_t dev __unused, struct uio *uio, int flag)
/* ARGSUSED */
static int
-random_write(dev_t dev __unused, struct uio *uio, int flag __unused)
+random_write(struct cdev *dev __unused, struct uio *uio, int flag __unused)
{
int c, error = 0;
void *random_buf;
@@ -158,7 +158,7 @@ random_write(dev_t dev __unused, struct uio *uio, int flag __unused)
/* ARGSUSED */
static int
-random_ioctl(dev_t dev __unused, u_long cmd, caddr_t addr __unused,
+random_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused,
int flags __unused, struct thread *td __unused)
{
int error = 0;
@@ -176,7 +176,7 @@ random_ioctl(dev_t dev __unused, u_long cmd, caddr_t addr __unused,
/* ARGSUSED */
static int
-random_poll(dev_t dev __unused, int events, struct thread *td)
+random_poll(struct cdev *dev __unused, int events, struct thread *td)
{
int revents = 0;
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 1135faf..d9b8e37 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -84,8 +84,8 @@
/* Per-channel structure */
struct rc_chans {
struct rc_softc *rc_rcb; /* back ptr */
- dev_t rc_dev; /* non-callout device */
- dev_t rc_cdev; /* callout device */
+ struct cdev *rc_dev; /* non-callout device */
+ struct cdev *rc_cdev; /* callout device */
u_short rc_flags; /* Misc. flags */
int rc_chan; /* Channel # */
u_char rc_ier; /* intr. enable reg */
@@ -234,7 +234,7 @@ rc_attach(device_t dev)
struct rc_softc *sc;
u_int port;
int base, chan, error, i, x;
- dev_t cdev;
+ struct cdev *cdev;
sc = device_get_softc(dev);
sc->sc_dev = dev;
@@ -853,7 +853,7 @@ rc_stop(struct tty *tp, int rw)
}
static int
-rcopen(dev_t dev, int flag, int mode, d_thread_t *td)
+rcopen(struct cdev *dev, int flag, int mode, d_thread_t *td)
{
struct rc_softc *sc;
struct rc_chans *rc;
@@ -944,7 +944,7 @@ out:
}
static int
-rcclose(dev_t dev, int flag, int mode, d_thread_t *td)
+rcclose(struct cdev *dev, int flag, int mode, d_thread_t *td)
{
struct rc_softc *sc;
struct rc_chans *rc;
@@ -1198,7 +1198,7 @@ rc_reinit(struct rc_softc *sc)
}
static int
-rcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, d_thread_t *td)
+rcioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, d_thread_t *td)
{
struct rc_chans *rc;
struct tty *tp;
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index fc5241d..3c092f5 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -802,7 +802,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports)
int retval;
struct rp_port *rp;
struct tty *tty;
- dev_t *dev_nodes;
+ struct cdev **dev_nodes;
unit = device_get_unit(ctlp->dev);
@@ -949,7 +949,7 @@ rp_releaseresource(CONTROLLER_t *ctlp)
static int
rpopen(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag, mode;
struct thread *td;
{
@@ -1108,7 +1108,7 @@ out2:
static int
rpclose(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag, mode;
struct thread *td;
{
@@ -1182,7 +1182,7 @@ rphardclose(struct rp_port *rp)
static
int
rpwrite(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -1222,7 +1222,7 @@ rpdtrwakeup(void *chan)
static int
rpioctl(dev, cmd, data, flag, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t data;
int flag;
diff --git a/sys/dev/rp/rpreg.h b/sys/dev/rp/rpreg.h
index a7cde1b..6852f7c 100644
--- a/sys/dev/rp/rpreg.h
+++ b/sys/dev/rp/rpreg.h
@@ -371,7 +371,7 @@ struct CONTROLLER_str
struct tty *tty; /* tty */
/* Device nodes */
- dev_t *dev_nodes;
+ struct cdev **dev_nodes;
/* Bus-specific properties */
void *bus_ctlp;
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index 083b85a..58a7056 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -83,7 +83,7 @@ struct sabtty_softc {
struct sab_softc *sc_parent;
bus_space_tag_t sc_bt;
bus_space_handle_t sc_bh;
- dev_t sc_si;
+ struct cdev *sc_si;
struct tty *sc_tty;
int sc_channel;
int sc_icnt;
@@ -639,7 +639,7 @@ sabtty_softintr(struct sabtty_softc *sc)
}
static int
-sabttyopen(dev_t dev, int flags, int mode, struct thread *td)
+sabttyopen(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct sabtty_softc *sc;
struct tty *tp;
@@ -717,7 +717,7 @@ sabttyopen(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-sabttyclose(dev_t dev, int flags, int mode, struct thread *td)
+sabttyclose(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct tty *tp;
@@ -733,7 +733,7 @@ sabttyclose(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-sabttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+sabttyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
struct sabtty_softc *sc;
struct tty *tp;
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 2a66a00..93332e2 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -178,7 +178,7 @@ scd_attach(struct scd_softc *sc)
}
static int
-scdopen(dev_t dev, int flags, int fmt, struct thread *td)
+scdopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct scd_softc *sc;
int rc;
@@ -225,7 +225,7 @@ scdopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-scdclose(dev_t dev, int flags, int fmt, struct thread *td)
+scdclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct scd_softc *sc;
@@ -327,7 +327,7 @@ scd_start(struct scd_softc *sc)
}
static int
-scdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
+scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
{
struct scd_softc *sc;
diff --git a/sys/dev/scd/scdvar.h b/sys/dev/scd/scdvar.h
index 9eb0199..773a78b 100644
--- a/sys/dev/scd/scdvar.h
+++ b/sys/dev/scd/scdvar.h
@@ -34,7 +34,7 @@ struct scd_data {
struct scd_softc {
device_t dev;
- dev_t scd_dev_t;
+ struct cdev *scd_dev_t;
int debug;
struct resource * port;
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 2a3601f..9732108 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -95,7 +95,7 @@ enum si_mctl { GET, SET, BIS, BIC };
static void si_command(struct si_port *, int, int);
static int si_modem(struct si_port *, enum si_mctl, int);
static void si_write_enable(struct si_port *, int);
-static int si_Sioctl(dev_t, u_long, caddr_t, int, struct thread *);
+static int si_Sioctl(struct cdev *, u_long, caddr_t, int, struct thread *);
static void si_start(struct tty *);
static void si_stop(struct tty *, int);
static timeout_t si_lstart;
@@ -589,7 +589,7 @@ try_next2:
}
static int
-siopen(dev_t dev, int flag, int mode, struct thread *td)
+siopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
int oldspl, error;
int card, port;
@@ -758,7 +758,7 @@ out:
}
static int
-siclose(dev_t dev, int flag, int mode, struct thread *td)
+siclose(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct si_port *pp;
struct tty *tp;
@@ -868,7 +868,7 @@ sidtrwakeup(void *chan)
}
static int
-siwrite(dev_t dev, struct uio *uio, int flag)
+siwrite(struct cdev *dev, struct uio *uio, int flag)
{
struct si_port *pp;
struct tty *tp;
@@ -907,7 +907,7 @@ out:
static int
-siioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+siioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct si_port *pp;
struct tty *tp;
@@ -1073,7 +1073,7 @@ out:
* Handle the Specialix ioctls. All MUST be called via the CONTROL device
*/
static int
-si_Sioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+si_Sioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct si_softc *xsc;
struct si_port *xpp;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 740cd26..3281428 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -271,7 +271,7 @@ struct com_s {
struct resource *ioportres;
int ioportrid;
void *cookie;
- dev_t devs[6];
+ struct cdev *devs[6];
/*
* Data area for output buffers. Someday we should build the output
@@ -1180,7 +1180,7 @@ determined_type: ;
static int
sioopen(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td;
@@ -1363,7 +1363,7 @@ out:
static int
sioclose(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td;
@@ -1460,7 +1460,7 @@ comhardclose(com)
static int
sioread(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -1478,7 +1478,7 @@ sioread(dev, uio, flag)
static int
siowrite(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -1961,7 +1961,7 @@ txrdy:
static int
sioioctl(dev, cmd, data, flag, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t data;
int flag;
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c
index c8edb93..4c1c5b1 100644
--- a/sys/dev/smbus/smb.c
+++ b/sys/dev/smbus/smb.c
@@ -46,7 +46,7 @@
struct smb_softc {
int sc_count; /* >0 if device opened */
- dev_t sc_devnode;
+ struct cdev *sc_devnode;
};
#define IIC_SOFTC(unit) \
@@ -137,7 +137,7 @@ smb_detach(device_t dev)
}
static int
-smbopen (dev_t dev, int flags, int fmt, struct thread *td)
+smbopen (struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct smb_softc *sc = IIC_SOFTC(minor(dev));
@@ -153,7 +153,7 @@ smbopen (dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-smbclose(dev_t dev, int flags, int fmt, struct thread *td)
+smbclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct smb_softc *sc = IIC_SOFTC(minor(dev));
@@ -170,7 +170,7 @@ smbclose(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-smbioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+smbioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
char buf[SMB_MAXBLOCKSIZE];
device_t parent;
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 7288a56..752dc42 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -62,7 +62,7 @@ static struct linesw snpdisc = {
struct snoop {
LIST_ENTRY(snoop) snp_list; /* List glue. */
int snp_unit; /* Device number. */
- dev_t snp_target; /* Target tty device. */
+ struct cdev *snp_target; /* Target tty device. */
struct tty *snp_tty; /* Target tty pointer. */
u_long snp_len; /* Possible length. */
u_long snp_base; /* Data base. */
@@ -106,9 +106,9 @@ static int snooplinedisc;
static LIST_HEAD(, snoop) snp_sclist = LIST_HEAD_INITIALIZER(&snp_sclist);
static struct clonedevs *snpclones;
-static struct tty *snpdevtotty(dev_t dev);
+static struct tty *snpdevtotty(struct cdev *dev);
static void snp_clone(void *arg, char *name,
- int namelen, dev_t *dev);
+ int namelen, struct cdev **dev);
static int snp_detach(struct snoop *snp);
static int snp_down(struct snoop *snp);
static int snp_in(struct snoop *snp, char *buf, int n);
@@ -175,7 +175,7 @@ snplwrite(tp, uio, flag)
static struct tty *
snpdevtotty(dev)
- dev_t dev;
+ struct cdev *dev;
{
struct cdevsw *cdp;
@@ -192,7 +192,7 @@ snpdevtotty(dev)
static int
snpwrite(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -231,7 +231,7 @@ tty_input:
static int
snpread(dev, uio, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int flag;
{
@@ -377,7 +377,7 @@ snp_in(snp, buf, n)
static int
snpopen(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag, mode;
struct thread *td;
{
@@ -451,7 +451,7 @@ detach_notty:
static int
snpclose(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -486,7 +486,7 @@ snp_down(snp)
static int
snpioctl(dev, cmd, data, flags, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t data;
int flags;
@@ -494,7 +494,7 @@ snpioctl(dev, cmd, data, flags, td)
{
struct snoop *snp;
struct tty *tp, *tpo;
- dev_t tdev;
+ struct cdev *tdev;
int s;
snp = dev->si_drv1;
@@ -577,7 +577,7 @@ snpioctl(dev, cmd, data, flags, td)
static int
snppoll(dev, events, td)
- dev_t dev;
+ struct cdev *dev;
int events;
struct thread *td;
{
@@ -605,7 +605,7 @@ snp_clone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
- dev_t *dev;
+ struct cdev **dev;
{
int u, i;
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 3b910c7..9200941 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -60,7 +60,7 @@ static eventhandler_tag dsp_ehtag;
#endif
static struct snddev_info *
-dsp_get_info(dev_t dev)
+dsp_get_info(struct cdev *dev)
{
struct snddev_info *d;
int unit;
@@ -74,7 +74,7 @@ dsp_get_info(dev_t dev)
}
static u_int32_t
-dsp_get_flags(dev_t dev)
+dsp_get_flags(struct cdev *dev)
{
device_t bdev;
int unit;
@@ -88,7 +88,7 @@ dsp_get_flags(dev_t dev)
}
static void
-dsp_set_flags(dev_t dev, u_int32_t flags)
+dsp_set_flags(struct cdev *dev, u_int32_t flags)
{
device_t bdev;
int unit;
@@ -108,7 +108,7 @@ dsp_set_flags(dev_t dev, u_int32_t flags)
* lock channels specified.
*/
static int
-getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio)
+getchns(struct cdev *dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio)
{
struct snddev_info *d;
u_int32_t flags;
@@ -152,7 +152,7 @@ getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32
/* unlock specified channels */
static void
-relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio)
+relchns(struct cdev *dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio)
{
struct snddev_info *d;
@@ -165,7 +165,7 @@ relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t
}
static int
-dsp_open(dev_t i_dev, int flags, int mode, struct thread *td)
+dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
struct pcm_channel *rdch, *wrch;
struct snddev_info *d;
@@ -319,7 +319,7 @@ dsp_open(dev_t i_dev, int flags, int mode, struct thread *td)
}
static int
-dsp_close(dev_t i_dev, int flags, int mode, struct thread *td)
+dsp_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
struct pcm_channel *rdch, *wrch;
struct snddev_info *d;
@@ -388,7 +388,7 @@ dsp_close(dev_t i_dev, int flags, int mode, struct thread *td)
}
static int
-dsp_read(dev_t i_dev, struct uio *buf, int flag)
+dsp_read(struct cdev *i_dev, struct uio *buf, int flag)
{
struct pcm_channel *rdch, *wrch;
intrmask_t s;
@@ -415,7 +415,7 @@ dsp_read(dev_t i_dev, struct uio *buf, int flag)
}
static int
-dsp_write(dev_t i_dev, struct uio *buf, int flag)
+dsp_write(struct cdev *i_dev, struct uio *buf, int flag)
{
struct pcm_channel *rdch, *wrch;
intrmask_t s;
@@ -442,7 +442,7 @@ dsp_write(dev_t i_dev, struct uio *buf, int flag)
}
static int
-dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
+dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
{
struct pcm_channel *chn, *rdch, *wrch;
struct snddev_info *d;
@@ -567,7 +567,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
{
snd_capabilities *p = (snd_capabilities *)arg;
struct pcmchan_caps *pcaps = NULL, *rcaps = NULL;
- dev_t pdev;
+ struct cdev *pdev;
if (rdch) {
CHN_LOCK(rdch);
@@ -1026,7 +1026,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
}
static int
-dsp_poll(dev_t i_dev, int events, struct thread *td)
+dsp_poll(struct cdev *i_dev, int events, struct thread *td)
{
struct pcm_channel *wrch = NULL, *rdch = NULL;
intrmask_t s;
@@ -1053,7 +1053,7 @@ dsp_poll(dev_t i_dev, int events, struct thread *td)
}
static int
-dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
+dsp_mmap(struct cdev *i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
{
struct pcm_channel *wrch = NULL, *rdch = NULL, *c;
intrmask_t s;
@@ -1114,9 +1114,9 @@ dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
* if xN.i isn't busy, return its dev_t
*/
static void
-dsp_clone(void *arg, char *name, int namelen, dev_t *dev)
+dsp_clone(void *arg, char *name, int namelen, struct cdev **dev)
{
- dev_t pdev;
+ struct cdev *pdev;
struct snddev_info *pcm_dev;
struct snddev_channel *pcm_chan;
int i, unit, devtype;
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index b5a67ed..47812fe 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -86,7 +86,7 @@ static struct cdevsw mixer_cdevsw = {
static eventhandler_tag mixer_ehtag;
#endif
-static dev_t
+static struct cdev *
mixer_get_devt(device_t dev)
{
struct snddev_info *snddev;
@@ -190,7 +190,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
struct snddev_info *snddev;
struct snd_mixer *m;
u_int16_t v;
- dev_t pdev;
+ struct cdev *pdev;
int i, unit;
m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO);
@@ -231,7 +231,7 @@ mixer_uninit(device_t dev)
{
int i;
struct snd_mixer *m;
- dev_t pdev;
+ struct cdev *pdev;
pdev = mixer_get_devt(dev);
m = pdev->si_drv1;
@@ -262,7 +262,7 @@ int
mixer_reinit(device_t dev)
{
struct snd_mixer *m;
- dev_t pdev;
+ struct cdev *pdev;
int i;
pdev = mixer_get_devt(dev);
@@ -318,7 +318,7 @@ int
mixer_hwvol_init(device_t dev)
{
struct snd_mixer *m;
- dev_t pdev;
+ struct cdev *pdev;
pdev = mixer_get_devt(dev);
m = pdev->si_drv1;
@@ -339,7 +339,7 @@ void
mixer_hwvol_mute(device_t dev)
{
struct snd_mixer *m;
- dev_t pdev;
+ struct cdev *pdev;
pdev = mixer_get_devt(dev);
m = pdev->si_drv1;
@@ -360,7 +360,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step)
{
struct snd_mixer *m;
int level, left, right;
- dev_t pdev;
+ struct cdev *pdev;
pdev = mixer_get_devt(dev);
m = pdev->si_drv1;
@@ -387,7 +387,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step)
/* ----------------------------------------------------------------------- */
static int
-mixer_open(dev_t i_dev, int flags, int mode, struct thread *td)
+mixer_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
struct snd_mixer *m;
intrmask_t s;
@@ -404,7 +404,7 @@ mixer_open(dev_t i_dev, int flags, int mode, struct thread *td)
}
static int
-mixer_close(dev_t i_dev, int flags, int mode, struct thread *td)
+mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
struct snd_mixer *m;
intrmask_t s;
@@ -426,7 +426,7 @@ mixer_close(dev_t i_dev, int flags, int mode, struct thread *td)
}
int
-mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
+mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
{
struct snd_mixer *m;
intrmask_t s;
@@ -479,7 +479,7 @@ mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
#ifdef USING_DEVFS
static void
-mixer_clone(void *arg, char *name, int namelen, dev_t *dev)
+mixer_clone(void *arg, char *name, int namelen, struct cdev **dev)
{
struct snddev_info *sd;
diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h
index ff4c22c..22bd22a 100644
--- a/sys/dev/sound/pcm/mixer.h
+++ b/sys/dev/sound/pcm/mixer.h
@@ -29,7 +29,7 @@
int mixer_init(device_t dev, kobj_class_t cls, void *devinfo);
int mixer_uninit(device_t dev);
int mixer_reinit(device_t dev);
-int mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td);
+int mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td);
int mixer_hwvol_init(device_t dev);
void mixer_hwvol_mute(device_t dev);
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index e96a802..0b391a7 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -62,7 +62,7 @@ struct sndstat_entry {
static struct mtx sndstat_lock;
#endif
static struct sbuf sndstat_sbuf;
-static dev_t sndstat_dev = 0;
+static struct cdev *sndstat_dev = 0;
static int sndstat_isopen = 0;
static int sndstat_bufptr;
static int sndstat_maxunit = -1;
@@ -103,7 +103,7 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RW,
0, sizeof(int), sysctl_hw_sndverbose, "I", "");
static int
-sndstat_open(dev_t i_dev, int flags, int mode, struct thread *td)
+sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
intrmask_t s;
int error;
@@ -136,7 +136,7 @@ out:
}
static int
-sndstat_close(dev_t i_dev, int flags, int mode, struct thread *td)
+sndstat_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
intrmask_t s;
@@ -156,7 +156,7 @@ sndstat_close(dev_t i_dev, int flags, int mode, struct thread *td)
}
static int
-sndstat_read(dev_t i_dev, struct uio *buf, int flag)
+sndstat_read(struct cdev *i_dev, struct uio *buf, int flag)
{
intrmask_t s;
int l, err;
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index 7acdfc8..5eae8e3 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -278,10 +278,10 @@ struct snddev_channel {
SLIST_ENTRY(snddev_channel) link;
struct pcm_channel *channel;
int chan_num;
- dev_t dsp_devt;
- dev_t dspW_devt;
- dev_t audio_devt;
- dev_t dspr_devt;
+ struct cdev *dsp_devt;
+ struct cdev *dspW_devt;
+ struct cdev *audio_devt;
+ struct cdev *dspr_devt;
};
struct snddev_info {
@@ -297,7 +297,7 @@ struct snddev_info {
struct sysctl_ctx_list sysctl_tree;
struct sysctl_oid *sysctl_tree_top;
struct mtx *lock;
- dev_t mixer_dev;
+ struct cdev *mixer_dev;
};
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index e73ab8d..2dc74e3 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -472,7 +472,7 @@ static char *spkr_inbuf; /* incoming buf */
static int
spkropen(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -499,7 +499,7 @@ spkropen(dev, flags, fmt, td)
static int
spkrwrite(dev, uio, ioflag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uio;
int ioflag;
{
@@ -531,7 +531,7 @@ spkrwrite(dev, uio, ioflag)
static int
spkrclose(dev, flags, fmt, td)
- dev_t dev;
+ struct cdev *dev;
int flags;
int fmt;
struct thread *td;
@@ -554,7 +554,7 @@ spkrclose(dev, flags, fmt, td)
static int
spkrioctl(dev, cmd, cmdarg, flags, td)
- dev_t dev;
+ struct cdev *dev;
unsigned long cmd;
caddr_t cmdarg;
int flags;
@@ -610,7 +610,7 @@ static struct isa_pnp_id speaker_ids[] = {
{ 0 }
};
-static dev_t speaker_dev;
+static struct cdev *speaker_dev;
static int
speaker_probe(device_t dev)
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index b67e39b..8ef790d 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -88,8 +88,8 @@ enum {
dev_unix_ord_stream = 40
};
-static dev_t dt_ptm, dt_arp, dt_icmp, dt_ip, dt_tcp, dt_udp, dt_rawip,
- dt_unix_dgram, dt_unix_stream, dt_unix_ord_stream;
+static struct cdev *dt_ptm, *dt_arp, *dt_icmp, *dt_ip, *dt_tcp, *dt_udp, *dt_rawip,
+ *dt_unix_dgram, *dt_unix_stream, *dt_unix_ord_stream;
static struct fileops svr4_netops = {
.fo_read = soo_read,
@@ -186,7 +186,7 @@ MODULE_VERSION(streams, 1);
* routine.
*/
static int
-streamsopen(dev_t dev, int oflags, int devtype, struct thread *td)
+streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
int type, protocol;
int fd, extraref;
diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c
index 5588ab7..0e0687e 100644
--- a/sys/dev/sx/sx.c
+++ b/sys/dev/sx/sx.c
@@ -332,7 +332,7 @@ sxattach(
*/
static int
sxopen(
- dev_t dev,
+ struct cdev *dev,
int flag,
int mode,
d_thread_t *p)
@@ -501,7 +501,7 @@ out:
*/
static int
sxclose(
- dev_t dev,
+ struct cdev *dev,
int flag,
int mode,
d_thread_t *p)
@@ -641,7 +641,7 @@ sxdtrwakeup(void *chan)
*/
static int
sxwrite(
- dev_t dev,
+ struct cdev *dev,
struct uio *uio,
int flag)
{
@@ -690,7 +690,7 @@ out: splx(oldspl);
*/
static int
sxioctl(
- dev_t dev,
+ struct cdev *dev,
u_long cmd,
caddr_t data,
int flag,
diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c
index f2ba283..dbc0dfc 100644
--- a/sys/dev/syscons/scvesactl.c
+++ b/sys/dev/syscons/scvesactl.c
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
static d_ioctl_t *prev_user_ioctl;
static int
-vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+vesa_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
scr_stat *scp;
struct tty *tp;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 0608ce5..12f0739 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -100,7 +100,7 @@ static struct tty *sc_console_tty;
static struct consdev *sc_consptr;
static void *kernel_console_ts;
static scr_stat main_console;
-static dev_t main_devs[MAXCONS];
+static struct cdev *main_devs[MAXCONS];
static char init_done = COLD;
static char shutdown_in_progress = FALSE;
@@ -148,12 +148,12 @@ static int debugger;
static int scvidprobe(int unit, int flags, int cons);
static int sckbdprobe(int unit, int flags, int cons);
static void scmeminit(void *arg);
-static int scdevtounit(dev_t dev);
+static int scdevtounit(struct cdev *dev);
static kbd_callback_func_t sckbdevent;
static int scparam(struct tty *tp, struct termios *t);
static void scstart(struct tty *tp);
static void scinit(int unit, int flags);
-static scr_stat *sc_get_stat(dev_t devptr);
+static scr_stat *sc_get_stat(struct cdev *devptr);
#if !__alpha__
static void scterm(int unit, int flags);
#endif
@@ -303,7 +303,7 @@ sc_attach_unit(int unit, int flags)
video_info_t info;
#endif
int vc;
- dev_t dev;
+ struct cdev *dev;
flags &= ~SC_KERNEL_CONSOLE;
@@ -442,7 +442,7 @@ scmeminit(void *arg)
SYSINIT(sc_mem, SI_SUB_KMEM, SI_ORDER_ANY, scmeminit, NULL);
static int
-scdevtounit(dev_t dev)
+scdevtounit(struct cdev *dev)
{
int vty = SC_VTY(dev);
@@ -455,7 +455,7 @@ scdevtounit(dev_t dev)
}
static int
-scopen(dev_t dev, int flag, int mode, struct thread *td)
+scopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
int unit = scdevtounit(dev);
sc_softc_t *sc;
@@ -518,7 +518,7 @@ scopen(dev_t dev, int flag, int mode, struct thread *td)
}
static int
-scclose(dev_t dev, int flag, int mode, struct thread *td)
+scclose(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct tty *tp = dev->si_tty;
scr_stat *scp;
@@ -568,7 +568,7 @@ scclose(dev_t dev, int flag, int mode, struct thread *td)
}
static int
-scread(dev_t dev, struct uio *uio, int flag)
+scread(struct cdev *dev, struct uio *uio, int flag)
{
if (!sc_saver_keyb_only)
sc_touch_scrn_saver();
@@ -654,7 +654,7 @@ scparam(struct tty *tp, struct termios *t)
}
static int
-scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int error;
int i;
@@ -2596,7 +2596,7 @@ void
sc_change_cursor_shape(scr_stat *scp, int flags, int base, int height)
{
sc_softc_t *sc;
- dev_t dev;
+ struct cdev *dev;
int s;
int i;
@@ -2741,7 +2741,7 @@ scinit(int unit, int flags)
kernel_default.rev_color);
} else {
/* assert(sc_malloc) */
- sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO);
+ sc->dev = malloc(sizeof(struct cdev *)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO);
sc->dev[0] = make_dev(&sc_cdevsw, unit * MAXCONS,
UID_ROOT, GID_WHEEL, 0600, "ttyv%r", unit * MAXCONS);
sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty);
@@ -3406,7 +3406,7 @@ next_code:
}
static int
-scmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
+scmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
{
scr_stat *scp;
@@ -3630,7 +3630,7 @@ blink_screen(void *arg)
*/
static scr_stat *
-sc_get_stat(dev_t devptr)
+sc_get_stat(struct cdev *devptr)
{
if (devptr == NULL)
return (&main_console);
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 217e50c..1651ad8 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -208,7 +208,7 @@ typedef struct sc_softc {
int first_vty;
int vtys;
- dev_t *dev;
+ struct cdev **dev;
struct scr_stat *cur_scp;
struct scr_stat *new_scp;
struct scr_stat *old_scp;
@@ -518,7 +518,7 @@ typedef struct {
(*kbdsw[(kbd)->kb_index]->poll)((kbd), (on))
/* syscons.c */
-extern int (*sc_user_ioctl)(dev_t dev, u_long cmd, caddr_t data,
+extern int (*sc_user_ioctl)(struct cdev *dev, u_long cmd, caddr_t data,
int flag, struct thread *td);
int sc_probe_unit(int unit, int flags);
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index ab1cd85..db2487d 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -66,7 +66,7 @@ static void smstart(struct tty *tp);
static int smparam(struct tty *tp, struct termios *t);
static int
-smopen(dev_t dev, int flag, int mode, struct thread *td)
+smopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct tty *tp;
@@ -101,7 +101,7 @@ smopen(dev_t dev, int flag, int mode, struct thread *td)
}
static int
-smclose(dev_t dev, int flag, int mode, struct thread *td)
+smclose(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct tty *tp;
int s;
@@ -145,7 +145,7 @@ smparam(struct tty *tp, struct termios *t)
}
static int
-smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+smioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
struct tty *tp;
mousehw_t *hw;
@@ -238,7 +238,7 @@ smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
static void
sm_attach_mouse(void *unused)
{
- dev_t dev;
+ struct cdev *dev;
dev = make_dev(&sm_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600,
"sysmouse");
diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c
index 1ba4ed7..351411a 100644
--- a/sys/dev/tdfx/tdfx_pci.c
+++ b/sys/dev/tdfx/tdfx_pci.c
@@ -402,7 +402,7 @@ tdfx_setmtrr(device_t dev) {
}
static int
-tdfx_open(dev_t dev, int flags, int fmt, struct thread *td)
+tdfx_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
/*
* The open cdev method handles open(2) calls to /dev/3dfx[n]
@@ -420,7 +420,7 @@ tdfx_open(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-tdfx_close(dev_t dev, int fflag, int devtype, struct thread *td)
+tdfx_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
{
/*
* The close cdev method handles close(2) calls to /dev/3dfx[n]
@@ -437,7 +437,7 @@ tdfx_close(dev_t dev, int fflag, int devtype, struct thread *td)
}
static int
-tdfx_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
+tdfx_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
{
/*
* mmap(2) is called by a user process to request that an area of memory
@@ -793,7 +793,7 @@ tdfx_do_pio(u_int cmd, struct tdfx_pio_data *piod)
* can return -retval and the error should be properly handled.
*/
static int
-tdfx_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
+tdfx_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int retval = 0;
struct tdfx_pio_data *piod = (struct tdfx_pio_data*)data;
diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h
index 67ce131..95a9bbf 100644
--- a/sys/dev/tdfx/tdfx_vars.h
+++ b/sys/dev/tdfx/tdfx_vars.h
@@ -92,7 +92,7 @@ struct tdfx_softc {
unsigned char dv;
struct file *curFile;
device_t dev;
- dev_t devt;
+ struct cdev *devt;
struct mem_range_desc mrdesc;
int busy;
};
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index ad5366e..b801916 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -3121,7 +3121,7 @@ ti_ioctl(ifp, command, data)
}
static int
-ti_open(dev_t dev, int flags, int fmt, struct thread *td)
+ti_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct ti_softc *sc;
@@ -3137,7 +3137,7 @@ ti_open(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-ti_close(dev_t dev, int flag, int fmt, struct thread *td)
+ti_close(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct ti_softc *sc;
@@ -3156,7 +3156,7 @@ ti_close(dev_t dev, int flag, int fmt, struct thread *td)
* This ioctl routine goes along with the Tigon character device.
*/
static int
-ti_ioctl2(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+ti_ioctl2(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
int error;
struct ti_softc *sc;
diff --git a/sys/dev/ti/if_tireg.h b/sys/dev/ti/if_tireg.h
index 71d9661..3552514 100644
--- a/sys/dev/ti/if_tireg.h
+++ b/sys/dev/ti/if_tireg.h
@@ -1025,7 +1025,7 @@ struct ti_softc {
int ti_txcnt;
struct mtx ti_mtx;
ti_flag_vals ti_flags;
- dev_t dev;
+ struct cdev *dev;
};
#define TI_LOCK(_sc) mtx_lock(&(_sc)->ti_mtx)
diff --git a/sys/dev/twa/twa.h b/sys/dev/twa/twa.h
index 5f49b49..812f326 100644
--- a/sys/dev/twa/twa.h
+++ b/sys/dev/twa/twa.h
@@ -174,7 +174,7 @@ struct twa_softc {
between ioctl calls */
device_t twa_bus_dev; /* bus device */
- dev_t twa_ctrl_dev; /* control device */
+ struct cdev *twa_ctrl_dev; /* control device */
struct resource *twa_io_res; /* register interface window */
bus_space_handle_t twa_bus_handle; /* bus space handle */
bus_space_tag_t twa_bus_tag; /* bus space tag */
diff --git a/sys/dev/twa/twa_freebsd.c b/sys/dev/twa/twa_freebsd.c
index 9879448..09642c1 100644
--- a/sys/dev/twa/twa_freebsd.c
+++ b/sys/dev/twa/twa_freebsd.c
@@ -75,7 +75,7 @@ static devclass_t twa_devclass;
* non-zero-- failure
*/
static int
-twa_open(dev_t dev, int flags, int fmt, d_thread_t *proc)
+twa_open(struct cdev *dev, int flags, int fmt, d_thread_t *proc)
{
int unit = minor(dev);
struct twa_softc *sc = devclass_get_softc(twa_devclass, unit);
@@ -100,7 +100,7 @@ twa_open(dev_t dev, int flags, int fmt, d_thread_t *proc)
* non-zero-- failure
*/
static int
-twa_close(dev_t dev, int flags, int fmt, d_thread_t *proc)
+twa_close(struct cdev *dev, int flags, int fmt, d_thread_t *proc)
{
int unit = minor(dev);
struct twa_softc *sc = devclass_get_softc(twa_devclass, unit);
@@ -128,7 +128,7 @@ twa_close(dev_t dev, int flags, int fmt, d_thread_t *proc)
* non-zero-- failure
*/
static int
-twa_ioctl_wrapper(dev_t dev, u_long cmd, caddr_t buf,
+twa_ioctl_wrapper(struct cdev *dev, u_long cmd, caddr_t buf,
int flags, d_thread_t *proc)
{
struct twa_softc *sc = (struct twa_softc *)(dev->si_drv1);
@@ -367,7 +367,7 @@ twa_free(struct twa_softc *sc)
TWA_IO_CONFIG_REG, sc->twa_io_res);
/* Destroy the control device. */
- if (sc->twa_ctrl_dev != (dev_t)NULL)
+ if (sc->twa_ctrl_dev != (struct cdev *)NULL)
destroy_dev(sc->twa_ctrl_dev);
sysctl_ctx_free(&sc->twa_sysctl_ctx);
diff --git a/sys/dev/twe/twe_compat.h b/sys/dev/twe/twe_compat.h
index 5cdad83..3729100 100644
--- a/sys/dev/twe/twe_compat.h
+++ b/sys/dev/twe/twe_compat.h
@@ -78,7 +78,7 @@
bus_dmamap_t twe_cmdmap; /* DMA map for command */ \
u_int32_t twe_cmdphys; /* address of command in controller space */ \
device_t twe_dev; /* bus device */ \
- dev_t twe_dev_t; /* control device */ \
+ struct cdev *twe_dev_t; /* control device */ \
struct resource *twe_io; /* register interface window */ \
bus_space_handle_t twe_bhandle; /* bus space handle */ \
bus_space_tag_t twe_btag; /* bus space tag */ \
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index 2415ca5..a29b3dd 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -79,7 +79,7 @@ static struct cdevsw twe_cdevsw = {
* Accept an open operation on the control device.
*/
static int
-twe_open(dev_t dev, int flags, int fmt, d_thread_t *td)
+twe_open(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
int unit = minor(dev);
struct twe_softc *sc = devclass_get_softc(twe_devclass, unit);
@@ -92,7 +92,7 @@ twe_open(dev_t dev, int flags, int fmt, d_thread_t *td)
* Accept the last close on the control device.
*/
static int
-twe_close(dev_t dev, int flags, int fmt, d_thread_t *td)
+twe_close(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
int unit = minor(dev);
struct twe_softc *sc = devclass_get_softc(twe_devclass, unit);
@@ -105,7 +105,7 @@ twe_close(dev_t dev, int flags, int fmt, d_thread_t *td)
* Handle controller-specific control operations.
*/
static int
-twe_ioctl_wrapper(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
+twe_ioctl_wrapper(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
{
struct twe_softc *sc = (struct twe_softc *)dev->si_drv1;
@@ -423,7 +423,7 @@ twe_free(struct twe_softc *sc)
bus_release_resource(sc->twe_dev, SYS_RES_IOPORT, TWE_IO_CONFIG_REG, sc->twe_io);
/* destroy control device */
- if (sc->twe_dev_t != (dev_t)NULL)
+ if (sc->twe_dev_t != (struct cdev *)NULL)
destroy_dev(sc->twe_dev_t);
sysctl_ctx_free(&sc->sysctl_ctx);
diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h
index 3c45199..1ea7779 100644
--- a/sys/dev/uart/uart_bus.h
+++ b/sys/dev/uart/uart_bus.h
@@ -158,7 +158,7 @@ struct uart_softc {
union {
/* TTY specific data. */
struct {
- dev_t si[2]; /* We have 2 device special files. */
+ struct cdev *si[2]; /* We have 2 device special files. */
struct tty *tp;
} u_tty;
/* Keyboard specific data. */
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index f42a7dc..ec10696 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -361,7 +361,7 @@ int uart_tty_detach(struct uart_softc *sc)
}
static int
-uart_tty_open(dev_t dev, int flags, int mode, struct thread *td)
+uart_tty_open(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct uart_softc *sc;
struct tty *tp;
@@ -450,7 +450,7 @@ uart_tty_open(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-uart_tty_close(dev_t dev, int flags, int mode, struct thread *td)
+uart_tty_close(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct uart_softc *sc;
struct tty *tp;
@@ -485,7 +485,7 @@ uart_tty_close(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-uart_tty_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags,
+uart_tty_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags,
struct thread *td)
{
struct uart_softc *sc;
diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c
index 62d20b1..d640494 100644
--- a/sys/dev/usb/ubser.c
+++ b/sys/dev/usb/ubser.c
@@ -158,7 +158,7 @@ struct ubser_softc {
u_int sc_opkthdrlen; /* header length of
output packet */
- dev_t dev[8];
+ struct cdev *dev[8];
};
Static d_open_t ubser_open;
@@ -853,7 +853,7 @@ ubser_cleanup(struct ubser_softc *sc)
}
static int
-ubser_open(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ubser_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct ubser_softc *sc;
struct tty *tp;
@@ -929,7 +929,7 @@ bad:
}
static int
-ubser_close(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ubser_close(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct ubser_softc *sc;
struct tty *tp;
@@ -952,7 +952,7 @@ quit:
}
static int
-ubser_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
+ubser_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
usb_device_request_t req;
struct ubser_softc *sc;
@@ -997,7 +997,7 @@ ubser_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
}
static int
-ubser_read(dev_t dev, struct uio *uio, int flag)
+ubser_read(struct cdev *dev, struct uio *uio, int flag)
{
struct ubser_softc *sc;
struct tty *tp;
@@ -1019,7 +1019,7 @@ ubser_read(dev_t dev, struct uio *uio, int flag)
}
static int
-ubser_write(dev_t dev, struct uio *uio, int flag)
+ubser_write(struct cdev *dev, struct uio *uio, int flag)
{
struct ubser_softc *sc;
struct tty *tp;
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 82ab31b..82245b7 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -249,7 +249,7 @@ ucom_shutdown(struct ucom_softc *sc)
}
Static int
-ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ucomopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
int unit = UCOMUNIT(dev);
struct ucom_softc *sc;
@@ -443,7 +443,7 @@ bad:
}
static int
-ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ucomclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct ucom_softc *sc;
struct tty *tp;
@@ -488,7 +488,7 @@ ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
static int
-ucomread(dev_t dev, struct uio *uio, int flag)
+ucomread(struct cdev *dev, struct uio *uio, int flag)
{
struct ucom_softc *sc;
struct tty *tp;
@@ -510,7 +510,7 @@ ucomread(dev_t dev, struct uio *uio, int flag)
}
static int
-ucomwrite(dev_t dev, struct uio *uio, int flag)
+ucomwrite(struct cdev *dev, struct uio *uio, int flag)
{
struct ucom_softc *sc;
struct tty *tp;
@@ -532,7 +532,7 @@ ucomwrite(dev_t dev, struct uio *uio, int flag)
}
static int
-ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
+ucomioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
struct ucom_softc *sc;
struct tty *tp;
diff --git a/sys/dev/usb/ucomvar.h b/sys/dev/usb/ucomvar.h
index ba00856..63146b9 100644
--- a/sys/dev/usb/ucomvar.h
+++ b/sys/dev/usb/ucomvar.h
@@ -173,7 +173,7 @@ struct ucom_softc {
int sc_refcnt;
u_char sc_dying; /* disconnecting */
- dev_t dev; /* special device node */
+ struct cdev *dev; /* special device node */
};
extern devclass_t ucom_devclass;
diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c
index db008ea..f8d640b 100644
--- a/sys/dev/usb/ufm.c
+++ b/sys/dev/usb/ufm.c
@@ -204,7 +204,7 @@ USB_ATTACH(ufm)
sc->sc_epaddr = edesc->bEndpointAddress;
#if defined(__FreeBSD__)
- /* XXX no error trapping, no storing of dev_t */
+ /* XXX no error trapping, no storing of struct cdev **/
(void) make_dev(&ufm_cdevsw, device_get_unit(self),
UID_ROOT, GID_OPERATOR,
0644, "ufm%d", device_get_unit(self));
@@ -224,7 +224,7 @@ USB_ATTACH(ufm)
int
-ufmopen(dev_t dev, int flag, int mode, usb_proc_ptr td)
+ufmopen(struct cdev *dev, int flag, int mode, usb_proc_ptr td)
{
struct ufm_softc *sc;
@@ -245,7 +245,7 @@ ufmopen(dev_t dev, int flag, int mode, usb_proc_ptr td)
}
int
-ufmclose(dev_t dev, int flag, int mode, usb_proc_ptr td)
+ufmclose(struct cdev *dev, int flag, int mode, usb_proc_ptr td)
{
struct ufm_softc *sc;
@@ -368,7 +368,7 @@ ufm_get_stat(struct ufm_softc *sc, caddr_t addr)
}
int
-ufmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr td)
+ufmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr td)
{
struct ufm_softc *sc;
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index a907423..81ae5f2 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -100,7 +100,7 @@ SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RW,
struct ugen_endpoint {
struct ugen_softc *sc;
#if defined(__FreeBSD__)
- dev_t dev;
+ struct cdev *dev;
#endif
usb_endpoint_descriptor_t *edesc;
usbd_interface_handle iface;
@@ -127,7 +127,7 @@ struct ugen_softc {
USBBASEDEVICE sc_dev; /* base device */
usbd_device_handle sc_udev;
#if defined(__FreeBSD__)
- dev_t dev;
+ struct cdev *dev;
#endif
char sc_is_open[USB_MAX_ENDPOINTS];
@@ -253,7 +253,7 @@ Static void
ugen_make_devnodes(struct ugen_softc *sc)
{
int endptno;
- dev_t dev;
+ struct cdev *dev;
for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) {
if (sc->sc_endpoints[endptno][IN].sc != NULL ||
@@ -283,7 +283,7 @@ Static void
ugen_destroy_devnodes(struct ugen_softc *sc)
{
int endptno;
- dev_t dev;
+ struct cdev *dev;
/* destroy all devices for the other (existing) endpoints as well */
for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) {
@@ -379,7 +379,7 @@ ugen_set_config(struct ugen_softc *sc, int configno)
}
int
-ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ugenopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct ugen_softc *sc;
int unit = UGENUNIT(dev);
@@ -519,7 +519,7 @@ ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-ugenclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ugenclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -725,7 +725,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
}
int
-ugenread(dev_t dev, struct uio *uio, int flag)
+ugenread(struct cdev *dev, struct uio *uio, int flag)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -825,7 +825,7 @@ ugen_do_write(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
}
int
-ugenwrite(dev_t dev, struct uio *uio, int flag)
+ugenwrite(struct cdev *dev, struct uio *uio, int flag)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -1390,7 +1390,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
}
int
-ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
+ugenioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
int endpt = UGENENDPOINT(dev);
struct ugen_softc *sc;
@@ -1406,7 +1406,7 @@ ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
}
int
-ugenpoll(dev_t dev, int events, usb_proc_ptr p)
+ugenpoll(struct cdev *dev, int events, usb_proc_ptr p)
{
struct ugen_softc *sc;
struct ugen_endpoint *sce;
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 461d35c..f19424b 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -136,7 +136,7 @@ struct uhid_softc {
u_char sc_dying;
#if defined(__FreeBSD__)
- dev_t dev;
+ struct cdev *dev;
#endif
};
@@ -393,7 +393,7 @@ uhid_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
}
int
-uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+uhidopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct uhid_softc *sc;
usbd_status err;
@@ -440,7 +440,7 @@ uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-uhidclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+uhidclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct uhid_softc *sc;
@@ -530,7 +530,7 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag)
}
int
-uhidread(dev_t dev, struct uio *uio, int flag)
+uhidread(struct cdev *dev, struct uio *uio, int flag)
{
struct uhid_softc *sc;
int error;
@@ -576,7 +576,7 @@ uhid_do_write(struct uhid_softc *sc, struct uio *uio, int flag)
}
int
-uhidwrite(dev_t dev, struct uio *uio, int flag)
+uhidwrite(struct cdev *dev, struct uio *uio, int flag)
{
struct uhid_softc *sc;
int error;
@@ -710,7 +710,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, int flag,
}
int
-uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
+uhidioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
struct uhid_softc *sc;
int error;
@@ -725,7 +725,7 @@ uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
}
int
-uhidpoll(dev_t dev, int events, usb_proc_ptr p)
+uhidpoll(struct cdev *dev, int events, usb_proc_ptr p)
{
struct uhid_softc *sc;
int revents = 0;
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 48aeb09..e8f38d8 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -122,8 +122,8 @@ struct ulpt_softc {
u_char sc_dying;
#if defined(__FreeBSD__)
- dev_t dev;
- dev_t dev_noprime;
+ struct cdev *dev;
+ struct cdev *dev_noprime;
#endif
};
@@ -490,7 +490,7 @@ int ulptusein = 1;
* Reset the printer, then wait until it's selected and not busy.
*/
int
-ulptopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ulptopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
u_char flags = ULPTFLAGS(dev);
struct ulpt_softc *sc;
@@ -625,7 +625,7 @@ ulpt_statusmsg(u_char status, struct ulpt_softc *sc)
}
int
-ulptclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+ulptclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct ulpt_softc *sc;
@@ -697,7 +697,7 @@ ulpt_do_write(struct ulpt_softc *sc, struct uio *uio, int flags)
}
int
-ulptwrite(dev_t dev, struct uio *uio, int flags)
+ulptwrite(struct cdev *dev, struct uio *uio, int flags)
{
struct ulpt_softc *sc;
int error;
@@ -715,7 +715,7 @@ ulptwrite(dev_t dev, struct uio *uio, int flags)
}
int
-ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
+ulptioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
int error = 0;
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index 1bb82ea..708f301 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -130,7 +130,7 @@ struct ums_softc {
# define UMS_SELECT 0x02 /* select is waiting */
struct selinfo rsel; /* process waiting in select */
- dev_t dev; /* specfs */
+ struct cdev *dev; /* specfs */
};
#define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE)
@@ -589,7 +589,7 @@ ums_disable(priv)
}
Static int
-ums_open(dev_t dev, int flag, int fmt, usb_proc_ptr p)
+ums_open(struct cdev *dev, int flag, int fmt, usb_proc_ptr p)
{
struct ums_softc *sc;
@@ -599,7 +599,7 @@ ums_open(dev_t dev, int flag, int fmt, usb_proc_ptr p)
}
Static int
-ums_close(dev_t dev, int flag, int fmt, usb_proc_ptr p)
+ums_close(struct cdev *dev, int flag, int fmt, usb_proc_ptr p)
{
struct ums_softc *sc;
@@ -615,7 +615,7 @@ ums_close(dev_t dev, int flag, int fmt, usb_proc_ptr p)
}
Static int
-ums_read(dev_t dev, struct uio *uio, int flag)
+ums_read(struct cdev *dev, struct uio *uio, int flag)
{
struct ums_softc *sc;
int s;
@@ -685,7 +685,7 @@ ums_read(dev_t dev, struct uio *uio, int flag)
}
Static int
-ums_poll(dev_t dev, int events, usb_proc_ptr p)
+ums_poll(struct cdev *dev, int events, usb_proc_ptr p)
{
struct ums_softc *sc;
int revents = 0;
@@ -711,7 +711,7 @@ ums_poll(dev_t dev, int events, usb_proc_ptr p)
}
int
-ums_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
+ums_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
struct ums_softc *sc;
int error = 0;
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index eaec4e5..8685f0d 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -148,7 +148,7 @@ struct urio_softc {
int sc_refcnt;
#if defined(__FreeBSD__)
- dev_t sc_dev_t;
+ struct cdev *sc_dev_t;
#endif /* defined(__FreeBSD__) */
#if defined(__NetBSD__) || defined(__OpenBSD__)
u_char sc_dying;
@@ -262,7 +262,7 @@ USB_ATTACH(urio)
}
#if defined(__FreeBSD__)
- /* XXX no error trapping, no storing of dev_t */
+ /* XXX no error trapping, no storing of struct cdev **/
sc->sc_dev_t = make_dev(&urio_cdevsw, device_get_unit(self),
UID_ROOT, GID_OPERATOR,
0644, "urio%d", device_get_unit(self));
@@ -282,7 +282,7 @@ USB_ATTACH(urio)
int
-urioopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+urioopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
#if (USBDI >= 1)
struct urio_softc * sc;
@@ -322,7 +322,7 @@ urioopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-urioclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+urioclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
#if (USBDI >= 1)
struct urio_softc * sc;
@@ -345,7 +345,7 @@ urioclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-urioread(dev_t dev, struct uio *uio, int flag)
+urioread(struct cdev *dev, struct uio *uio, int flag)
{
#if (USBDI >= 1)
struct urio_softc * sc;
@@ -419,7 +419,7 @@ urioread(dev_t dev, struct uio *uio, int flag)
}
int
-uriowrite(dev_t dev, struct uio *uio, int flag)
+uriowrite(struct cdev *dev, struct uio *uio, int flag)
{
#if (USBDI >= 1)
struct urio_softc * sc;
@@ -486,7 +486,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag)
int
-urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
+urioioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p)
{
#if (USBDI >= 1)
struct urio_softc * sc;
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index d2ce30f..d934491 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -470,7 +470,7 @@ usbctlprint(void *aux, const char *pnp)
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
int
-usbopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+usbopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
int unit = USBUNIT(dev);
struct usb_softc *sc;
@@ -492,7 +492,7 @@ usbopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-usbread(dev_t dev, struct uio *uio, int flag)
+usbread(struct cdev *dev, struct uio *uio, int flag)
{
struct usb_event ue;
int unit = USBUNIT(dev);
@@ -526,7 +526,7 @@ usbread(dev_t dev, struct uio *uio, int flag)
}
int
-usbclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+usbclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
int unit = USBUNIT(dev);
@@ -539,7 +539,7 @@ usbclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
+usbioctl(struct cdev *devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
{
struct usb_softc *sc;
int unit = USBUNIT(devt);
@@ -659,7 +659,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
}
int
-usbpoll(dev_t dev, int events, usb_proc_ptr p)
+usbpoll(struct cdev *dev, int events, usb_proc_ptr p)
{
int revents, mask, s;
int unit = USBUNIT(dev);
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index f1a3700..e085c69 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -232,7 +232,7 @@ struct uscanner_softc {
usbd_device_handle sc_udev;
usbd_interface_handle sc_iface;
#if defined(__FreeBSD__)
- dev_t dev;
+ struct cdev *dev;
#endif
u_int sc_dev_flags;
@@ -380,7 +380,7 @@ USB_ATTACH(uscanner)
}
int
-uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p)
+uscanneropen(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct uscanner_softc *sc;
int unit = USCANNERUNIT(dev);
@@ -443,7 +443,7 @@ uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p)
}
int
-uscannerclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
+uscannerclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p)
{
struct uscanner_softc *sc;
@@ -541,7 +541,7 @@ uscanner_do_read(struct uscanner_softc *sc, struct uio *uio, int flag)
}
int
-uscannerread(dev_t dev, struct uio *uio, int flag)
+uscannerread(struct cdev *dev, struct uio *uio, int flag)
{
struct uscanner_softc *sc;
int error;
@@ -591,7 +591,7 @@ uscanner_do_write(struct uscanner_softc *sc, struct uio *uio, int flag)
}
int
-uscannerwrite(dev_t dev, struct uio *uio, int flag)
+uscannerwrite(struct cdev *dev, struct uio *uio, int flag)
{
struct uscanner_softc *sc;
int error;
@@ -674,7 +674,7 @@ USB_DETACH(uscanner)
}
int
-uscannerpoll(dev_t dev, int events, usb_proc_ptr p)
+uscannerpoll(struct cdev *dev, int events, usb_proc_ptr p)
{
struct uscanner_softc *sc;
int revents = 0;
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 8e1bf36..3306c96 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -69,12 +69,12 @@ struct cdevsw vinum_cdevsw = {
/* Called by main() during pseudo-device attachment. */
void vinumattach(void *);
STATIC int vinum_modevent(module_t mod, modeventtype_t type, void *unused);
-STATIC void vinum_clone(void *arg, char *name, int namelen, dev_t * dev);
+STATIC void vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev);
struct _vinum_conf vinum_conf; /* configuration information */
-dev_t vinum_daemon_dev;
-dev_t vinum_super_dev;
+struct cdev *vinum_daemon_dev;
+struct cdev *vinum_super_dev;
static eventhandler_tag dev_clone_tag;
@@ -334,7 +334,7 @@ DECLARE_MODULE(vinum, vinum_mod, SI_SUB_RAID, SI_ORDER_MIDDLE);
/* ARGSUSED */
/* Open a vinum object */
int
-vinumopen(dev_t dev,
+vinumopen(struct cdev *dev,
int flags,
int fmt,
struct thread *td)
@@ -437,7 +437,7 @@ vinumopen(dev_t dev,
/* ARGSUSED */
int
-vinumclose(dev_t dev,
+vinumclose(struct cdev *dev,
int flags,
int fmt,
struct thread *td)
@@ -517,7 +517,7 @@ vinumclose(dev_t dev,
}
void
-vinum_clone(void *arg, char *name, int namelen, dev_t * dev)
+vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev)
{
struct volume *vol;
int i;
diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h
index 86319f0..e60356c 100644
--- a/sys/dev/vinum/vinumext.h
+++ b/sys/dev/vinum/vinumext.h
@@ -141,13 +141,13 @@ d_close_t vinumclose;
d_strategy_t vinumstrategy;
d_ioctl_t vinumioctl;
-int vinum_super_ioctl(dev_t, u_long, caddr_t);
+int vinum_super_ioctl(struct cdev *, u_long, caddr_t);
int vinumstart(struct buf *bp, int reviveok);
int launch_requests(struct request *rq, int reviveok);
void sdio(struct buf *bp);
/* XXX Do we need this? */
-int vinumpart(dev_t);
+int vinumpart(struct cdev *);
extern jmp_buf command_fail; /* return here if config fails */
@@ -172,9 +172,9 @@ struct rqgroup *allocrqg(struct request *rq, int elements);
void deallocrqg(struct rqgroup *rqg);
/* Device number decoding */
-int Volno(dev_t x);
-int Plexno(dev_t x);
-int Sdno(dev_t x);
+int Volno(struct cdev *x);
+int Plexno(struct cdev *x);
+int Sdno(struct cdev *x);
/* State transitions */
int set_drive_state(int driveno, enum drivestate state, enum setstateflags flags);
diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c
index f38017f..1783c92 100644
--- a/sys/dev/vinum/vinumioctl.c
+++ b/sys/dev/vinum/vinumioctl.c
@@ -65,7 +65,7 @@ jmp_buf command_fail; /* return on a failed command */
/* ioctl routine */
int
-vinumioctl(dev_t dev,
+vinumioctl(struct cdev *dev,
u_long cmd,
caddr_t data,
int flag,
@@ -178,7 +178,7 @@ vinumioctl(dev_t dev,
/* Handle ioctls for the super device */
int
-vinum_super_ioctl(dev_t dev,
+vinum_super_ioctl(struct cdev *dev,
u_long cmd,
caddr_t data)
{
diff --git a/sys/dev/vinum/vinumobj.h b/sys/dev/vinum/vinumobj.h
index 0d5b800..d6a4d87 100644
--- a/sys/dev/vinum/vinumobj.h
+++ b/sys/dev/vinum/vinumobj.h
@@ -184,7 +184,7 @@ struct _drive
#ifdef _KERNEL
u_int sectorsize;
off_t mediasize;
- dev_t dev; /* device information */
+ struct cdev *dev; /* device information */
#ifdef VINUMDEBUG
char lockfilename[16]; /* name of file from which we were locked */
int lockline; /* and the line number */
@@ -234,7 +234,7 @@ struct _sd
int init_interval; /* and time to wait between transfers */
#ifdef _KERNEL
struct request *waitlist; /* list of requests waiting on revive op */
- dev_t dev; /* associated device */
+ struct cdev *dev; /* associated device */
#endif
};
@@ -276,7 +276,7 @@ struct _plex
struct rangelock *lock; /* ranges of locked addresses */
struct mtx *lockmtx; /* lock mutex, one of plexmutex [] */
daddr_t last_addr; /* last address read from this plex */
- dev_t dev; /* associated device */
+ struct cdev *dev; /* associated device */
#endif
};
@@ -316,6 +316,6 @@ struct _volume
*/
int plex[MAXPLEX]; /* index of plexes */
#ifdef _KERNEL
- dev_t dev; /* associated device */
+ struct cdev *dev; /* associated device */
#endif
};
diff --git a/sys/dev/vinum/vinumutil.c b/sys/dev/vinum/vinumutil.c
index f597cd7..f63bbd7 100644
--- a/sys/dev/vinum/vinumutil.c
+++ b/sys/dev/vinum/vinumutil.c
@@ -243,12 +243,17 @@ sizespec(char *spec)
return -1;
}
+#ifdef _KERNEL
+#define FOOTYPE struct cdev *
+#else
+#define FOOTYPE dev_t
+#endif
/*
* Extract the volume number from a device number. Check that it's
* the correct type, and that it isn't one of the superdevs.
*/
int
-Volno(dev_t dev)
+Volno(FOOTYPE dev)
{
int volno = minor(dev);
@@ -269,7 +274,7 @@ Volno(dev_t dev)
* type. Return -1 for invalid types.
*/
int
-Plexno(dev_t dev)
+Plexno(FOOTYPE dev)
{
int plexno = minor(dev);
@@ -285,7 +290,7 @@ Plexno(dev_t dev)
* type. Return -1 for invalid types.
*/
int
-Sdno(dev_t dev)
+Sdno(FOOTYPE dev)
{
int sdno = minor(dev);
diff --git a/sys/dev/watchdog/watchdog.c b/sys/dev/watchdog/watchdog.c
index a76e3ef..7823885 100644
--- a/sys/dev/watchdog/watchdog.c
+++ b/sys/dev/watchdog/watchdog.c
@@ -39,10 +39,10 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <machine/bus.h>
-static dev_t wd_dev;
+static struct cdev *wd_dev;
static int
-wd_ioctl(dev_t dev __unused, u_long cmd, caddr_t data,
+wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data,
int flags __unused, struct thread *td)
{
int error;
diff --git a/sys/dev/zs/z8530var.h b/sys/dev/zs/z8530var.h
index 89a246a..1e5fef7 100644
--- a/sys/dev/zs/z8530var.h
+++ b/sys/dev/zs/z8530var.h
@@ -43,7 +43,7 @@ struct zstty_softc {
bus_space_tag_t sc_bt;
bus_space_handle_t sc_csr;
bus_space_handle_t sc_data;
- dev_t sc_si;
+ struct cdev *sc_si;
struct tty *sc_tty;
int sc_icnt;
uint8_t *sc_iput;
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index 4695526..bc848fb 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -447,7 +447,7 @@ zstty_softintr(struct zstty_softc *sc)
}
static int
-zsttyopen(dev_t dev, int flags, int mode, struct thread *td)
+zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct zstty_softc *sc;
struct tty *tp;
@@ -503,7 +503,7 @@ zsttyopen(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-zsttyclose(dev_t dev, int flags, int mode, struct thread *td)
+zsttyclose(struct cdev *dev, int flags, int mode, struct thread *td)
{
struct tty *tp;
@@ -519,7 +519,7 @@ zsttyclose(dev_t dev, int flags, int mode, struct thread *td)
}
static int
-zsttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
+zsttyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
struct zstty_softc *sc;
struct tty *tp;
OpenPOWER on IntegriCloud