Do the dreaded s/dev_t/struct cdev */

Bump __FreeBSD_version accordingly.
This commit is contained in:
Poul-Henning Kamp 2004-06-16 09:47:26 +00:00
parent d420fcda27
commit 89c9c53da0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130585
331 changed files with 1290 additions and 1279 deletions

View File

@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_extern.h>
static dev_t memdev, kmemdev;
static struct cdev *memdev, *kmemdev;
#ifdef PERFMON
static dev_t perfdev;
static struct cdev *perfdev;
#endif /* PERFMON */
static d_open_t mmopen;
@ -95,7 +95,7 @@ static struct cdevsw mem_cdevsw = {
struct mem_range_softc mem_range_softc;
static int
mmclose(dev_t dev, int flags, int fmt, struct thread *td)
mmclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
switch (minor(dev)) {
#ifdef PERFMON
@ -109,7 +109,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
mmopen(dev_t dev, int flags, int fmt, struct thread *td)
mmopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int error;
@ -136,7 +136,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td)
/*ARGSUSED*/
static int
mmrw(dev_t dev, struct uio *uio, int flags)
mmrw(struct cdev *dev, struct uio *uio, int flags)
{
vm_offset_t o, v;
int c = 0;
@ -219,7 +219,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
* instead of going through read/write *
\*******************************************************/
static int
memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
{
/*
* /dev/mem is the only one that makes sense through this
@ -240,7 +240,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
}
static int
mmioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td)
mmioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td)
{
switch(minor(dev)) {
#ifdef PERFMON

View File

@ -86,7 +86,7 @@ void promcons_delayed_makedev(void);
int
promopen(dev, flag, mode, td)
dev_t dev;
struct cdev *dev;
int flag, mode;
struct thread *td;
{
@ -137,7 +137,7 @@ promopen(dev, flag, mode, td)
int
promclose(dev, flag, mode, td)
dev_t dev;
struct cdev *dev;
int flag, mode;
struct thread *td;
{

View File

@ -66,7 +66,7 @@ struct clockframe {
/*
* CTL_MACHDEP definitions.
*/
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */
#define CPU_ROOT_DEVICE 2 /* string: root device name */
#define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */
#define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */

View File

@ -258,7 +258,7 @@ zs_cnputc(struct consdev *cp, int c)
static int
zsopen(dev_t dev, int flag, int mode, struct thread *td)
zsopen(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct zs_softc *sc = ZS_SOFTC(minor(dev));
struct tty *tp;
@ -305,7 +305,7 @@ zsopen(dev_t dev, int flag, int mode, struct thread *td)
}
static int
zsclose(dev_t dev, int flag, int mode, struct thread *td)
zsclose(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct zs_softc *sc = ZS_SOFTC(minor(dev));
struct tty *tp;

View File

@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_extern.h>
static dev_t memdev, kmemdev, iodev;
static struct cdev *memdev, *kmemdev, *iodev;
static d_open_t mmopen;
static d_close_t mmclose;
@ -95,7 +95,7 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors");
struct mem_range_softc mem_range_softc;
static int
mmclose(dev_t dev, int flags, int fmt, struct thread *td)
mmclose(struct cdev *dev, int flags, int fmt, struct thread *td)
{
switch (minor(dev)) {
case 14:
@ -105,7 +105,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
mmopen(dev_t dev, int flags, int fmt, struct thread *td)
mmopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int error;
@ -133,7 +133,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td)
/*ARGSUSED*/
static int
mmrw(dev_t dev, struct uio *uio, int flags)
mmrw(struct cdev *dev, struct uio *uio, int flags)
{
int o;
u_long c = 0, v;
@ -214,7 +214,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
* instead of going through read/write *
\*******************************************************/
static int
memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
{
switch (minor(dev))
{
@ -242,7 +242,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
* and mem_range_attr_set.
*/
static int
mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
mmioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
{
int nd, error = 0;
struct mem_range_op *mo = (struct mem_range_op *)data;

View File

@ -65,7 +65,7 @@
/*
* CTL_MACHDEP definitions.
*/
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */
#define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */
#define CPU_DISRTCSET 3 /* int: disable resettodr() call */
#define CPU_WALLCLOCK 5 /* int: indicates wall CMOS clock */

View File

@ -190,7 +190,7 @@ nexus_bs_subregion(t, bsh, offset, size, nbshp)
}
int
nexus_bs_mmap(dev_t dev, vm_offset_t off, vm_paddr_t *addr, int prot)
nexus_bs_mmap(struct cdev *dev, vm_offset_t off, vm_paddr_t *addr, int prot)
{
*addr = off;
return (0);

View File

@ -118,7 +118,7 @@ struct bus_space {
void * (*bs_vaddr) (void *, bus_space_handle_t);
/* mmap bus space for user */
int (*bs_mmap) (dev_t, vm_offset_t, vm_paddr_t *, int);
int (*bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int);
/* barrier */
void (*bs_barrier) (void *, bus_space_handle_t,
@ -411,7 +411,7 @@ void __bs_c(f,_bs_free) (void *t, bus_space_handle_t bsh, \
void * __bs_c(f,_bs_vaddr) (void *t, bus_space_handle_t bsh);
#define bs_mmap_proto(f) \
int __bs_c(f,_bs_mmap) (dev_t, vm_offset_t, vm_paddr_t *, int);
int __bs_c(f,_bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int);
#define bs_barrier_proto(f) \
void __bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh, \

View File

@ -225,7 +225,7 @@ sa11x0_bs_subregion(t, bsh, offset, size, nbshp)
}
int
sa11x0_bs_mmap(dev_t t, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
sa11x0_bs_mmap(struct cdev *t, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
{
*paddr = offset;
return (0);

View File

@ -325,7 +325,7 @@ bc_read(int unit, daddr_t dblk, int blks, caddr_t dest)
}
/*
* Return a suitable dev_t value for (dev).
* Return a suitable struct cdev *value for (dev).
*/
int
bc_getdev(struct i386_devdesc *dev)
@ -344,7 +344,7 @@ bc_getdev(struct i386_devdesc *dev)
* XXX: Need to examine device spec here to figure out if SCSI or
* ATAPI. No idea on how to figure out device number. All we can
* really pass to the kernel is what bus and device on which bus we
* were booted from, which dev_t isn't well suited to since those
* were booted from, which struct cdev *isn't well suited to since those
* number don't match to unit numbers very well. We may just need
* to engage in a hack where we pass -C to the boot args if we are
* the boot device.

View File

@ -1165,7 +1165,7 @@ bd_getbigeom(int bunit)
}
/*
* Return a suitable dev_t value for (dev).
* Return a suitable struct cdev *value for (dev).
*
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
* IDE disks to be specified in $num_ide_disks. There should be a Better Way.

View File

@ -72,13 +72,13 @@ extern struct devsw pxedisk;
extern struct fs_ops pxe_fsops;
int bc_add(int biosdev); /* Register CD booted from. */
int bc_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */
int bc_getdev(struct i386_devdesc *dev); /* return struct cdev *for (dev) */
int bc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */
int bc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */
u_int32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */
int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */
int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */
int bd_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */
int bd_getdev(struct i386_devdesc *dev); /* return struct cdev *for (dev) */
ssize_t i386_copyin(const void *src, vm_offset_t dest, const size_t len);
ssize_t i386_copyout(const vm_offset_t src, void *dest, const size_t len);

View File

@ -94,7 +94,7 @@ struct dinode {
* The di_db fields may be overlaid with other information for
* file types that do not have associated disk storage. Block
* and character devices overlay the first data block with their
* dev_t value. Short symbolic links place their path in the
* struct cdev *value. Short symbolic links place their path in the
* di_db area.
*/
#define di_inumber di_u.inumber

View File

@ -69,7 +69,7 @@ struct inode {
struct vnode *i_vnode;/* Vnode associated with this inode. */
struct vnode *i_devvp;/* Vnode for block I/O. */
u_int32_t i_flag; /* flags, see below */
dev_t i_dev; /* Device associated with the inode. */
struct cdev *i_dev; /* Device associated with the inode. */
ino_t i_number; /* The identity of the inode. */
int i_effnlink; /* i_nlink when I/O completes */

View File

@ -1481,7 +1481,7 @@ bd_getbigeom(int bunit)
}
/*
* Return a suitable dev_t value for (dev).
* Return a suitable struct cdev *value for (dev).
*
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
* IDE disks to be specified in $num_ide_disks. There should be a Better Way.

View File

@ -936,7 +936,7 @@ xptdone(struct cam_periph *periph, union ccb *done_ccb)
}
static int
xptopen(dev_t dev, int flags, int fmt, struct thread *td)
xptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int unit;
@ -973,7 +973,7 @@ xptopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
xptclose(dev_t dev, int flag, int fmt, struct thread *td)
xptclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
int unit;
@ -996,7 +996,7 @@ xptclose(dev_t dev, int flag, int fmt, struct thread *td)
}
static int
xptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
int unit, error;

View File

@ -145,7 +145,7 @@ struct ch_softc {
ch_quirks quirks;
union ccb saved_ccb;
struct devstat *device_stats;
dev_t dev;
struct cdev *dev;
int sc_picker; /* current picker */
@ -405,7 +405,7 @@ chregister(struct cam_periph *periph, void *arg)
}
static int
chopen(dev_t dev, int flags, int fmt, struct thread *td)
chopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ch_softc *softc;
@ -453,7 +453,7 @@ chopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
chclose(dev_t dev, int flag, int fmt, struct thread *td)
chclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ch_softc *softc;
@ -702,7 +702,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
}
static int
chioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
chioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct cam_periph *periph;
struct ch_softc *softc;

View File

@ -74,7 +74,7 @@ struct pass_softc {
u_int8_t pd_type;
union ccb saved_ccb;
struct devstat *device_stats;
dev_t dev;
struct cdev *dev;
};
@ -317,7 +317,7 @@ passregister(struct cam_periph *periph, void *arg)
}
static int
passopen(dev_t dev, int flags, int fmt, struct thread *td)
passopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pass_softc *softc;
@ -384,7 +384,7 @@ passopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
passclose(dev_t dev, int flag, int fmt, struct thread *td)
passclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pass_softc *softc;
@ -446,7 +446,7 @@ passdone(struct cam_periph *periph, union ccb *done_ccb)
}
static int
passioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
passioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct cam_periph *periph;
struct pass_softc *softc;

View File

@ -83,7 +83,7 @@ struct pt_softc {
pt_flags flags;
union ccb saved_ccb;
int io_timeout;
dev_t dev;
struct cdev *dev;
};
static d_open_t ptopen;
@ -134,7 +134,7 @@ static struct cdevsw pt_cdevsw = {
#endif
static int
ptopen(dev_t dev, int flags, int fmt, struct thread *td)
ptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pt_softc *softc;
@ -178,7 +178,7 @@ ptopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
ptclose(dev_t dev, int flag, int fmt, struct thread *td)
ptclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pt_softc *softc;
@ -645,7 +645,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
}
static int
ptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
ptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct cam_periph *periph;
struct pt_softc *softc;

View File

@ -192,11 +192,11 @@ typedef enum {
#define SA_NUM_MODES 4
struct sa_devs {
dev_t ctl_dev;
struct cdev *ctl_dev;
struct sa_mode_devs {
dev_t r_dev;
dev_t nr_dev;
dev_t er_dev;
struct cdev *r_dev;
struct cdev *nr_dev;
struct cdev *er_dev;
} mode_devs[SA_NUM_MODES];
};
@ -398,7 +398,7 @@ static void saprevent(struct cam_periph *periph, int action);
static int sarewind(struct cam_periph *periph);
static int saspace(struct cam_periph *periph, int count,
scsi_space_code code);
static int samount(struct cam_periph *, int, dev_t);
static int samount(struct cam_periph *, int, struct cdev *);
static int saretension(struct cam_periph *periph);
static int sareservereleaseunit(struct cam_periph *periph,
int reserve);
@ -437,7 +437,7 @@ static struct cdevsw sa_cdevsw = {
};
static int
saopen(dev_t dev, int flags, int fmt, struct thread *td)
saopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct sa_softc *softc;
@ -497,7 +497,7 @@ saopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
saclose(dev_t dev, int flag, int fmt, struct thread *td)
saclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct sa_softc *softc;
@ -756,7 +756,7 @@ sastrategy(struct bio *bp)
}
static int
saioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
saioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
{
struct cam_periph *periph;
struct sa_softc *softc;
@ -1473,7 +1473,7 @@ saregister(struct cam_periph *periph, void *arg)
* Make the (well known) aliases for the first mode.
*/
if (i == 0) {
dev_t alias;
struct cdev *alias;
alias = make_dev_alias(softc->devs.mode_devs[i].r_dev,
"%s%d", periph->periph_name, periph->unit_number);
@ -1777,7 +1777,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
* Mount the tape (make sure it's ready for I/O).
*/
static int
samount(struct cam_periph *periph, int oflags, dev_t dev)
samount(struct cam_periph *periph, int oflags, struct cdev *dev)
{
struct sa_softc *softc;
union ccb *ccb;

View File

@ -145,7 +145,7 @@ struct ses_softc {
ses_encstat ses_encstat; /* overall status */
u_int8_t ses_flags;
union ccb ses_saved_ccb;
dev_t ses_dev;
struct cdev *ses_dev;
struct cam_periph *periph;
};
#define SES_FLAG_INVALID 0x01
@ -405,7 +405,7 @@ sesregister(struct cam_periph *periph, void *arg)
}
static int
sesopen(dev_t dev, int flags, int fmt, struct thread *td)
sesopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ses_softc *softc;
@ -461,7 +461,7 @@ sesopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
sesclose(dev_t dev, int flag, int fmt, struct thread *td)
sesclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ses_softc *softc;
@ -517,7 +517,7 @@ seserror(union ccb *ccb, u_int32_t cflags, u_int32_t sflags)
}
static int
sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td)
sesioctl(struct cdev *dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td)
{
struct cam_periph *periph;
ses_encstat tmp;

View File

@ -142,7 +142,7 @@ static struct targ_cmd_descr *
targgetdescr(struct targ_softc *softc);
static periph_init_t targinit;
static void targclone(void *arg, char *name, int namelen,
dev_t *dev);
struct cdev **dev);
static void targasync(void *callback_arg, u_int32_t code,
struct cam_path *path, void *arg);
static void abort_all_pending(struct targ_softc *softc);
@ -165,7 +165,7 @@ static MALLOC_DEFINE(M_TARG, "TARG", "TARG data");
/* Create softc and initialize it. Only one proc can open each targ device. */
static int
targopen(dev_t dev, int flags, int fmt, struct thread *td)
targopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct targ_softc *softc;
@ -202,7 +202,7 @@ targopen(dev_t dev, int flags, int fmt, struct thread *td)
/* Disable LUN if enabled and teardown softc */
static int
targclose(dev_t dev, int flag, int fmt, struct thread *td)
targclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct targ_softc *softc;
int error;
@ -230,7 +230,7 @@ targclose(dev_t dev, int flag, int fmt, struct thread *td)
/* Enable/disable LUNs, set debugging level */
static int
targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
targioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct targ_softc *softc;
cam_status status;
@ -303,7 +303,7 @@ targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
/* Writes are always ready, reads wait for user_ccb_queue or abort_queue */
static int
targpoll(dev_t dev, int poll_events, struct thread *td)
targpoll(struct cdev *dev, int poll_events, struct thread *td)
{
struct targ_softc *softc;
int revents;
@ -329,7 +329,7 @@ targpoll(dev_t dev, int poll_events, struct thread *td)
}
static int
targkqfilter(dev_t dev, struct knote *kn)
targkqfilter(struct cdev *dev, struct knote *kn)
{
struct targ_softc *softc;
@ -534,7 +534,7 @@ targdtor(struct cam_periph *periph)
/* Receive CCBs from user mode proc and send them to the HBA */
static int
targwrite(dev_t dev, struct uio *uio, int ioflag)
targwrite(struct cdev *dev, struct uio *uio, int ioflag)
{
union ccb *user_ccb;
struct targ_softc *softc;
@ -835,7 +835,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
/* Return CCBs to the user from the user queue and abort queue */
static int
targread(dev_t dev, struct uio *uio, int ioflag)
targread(struct cdev *dev, struct uio *uio, int ioflag)
{
struct descr_queue *abort_queue;
struct targ_cmd_descr *user_descr;
@ -1031,7 +1031,7 @@ targinit(void)
}
static void
targclone(void *arg, char *name, int namelen, dev_t *dev)
targclone(void *arg, char *name, int namelen, struct cdev **dev)
{
int u;

View File

@ -109,7 +109,7 @@ struct cnode {
struct vattr c_vattr; /* attributes */
char *c_symlink; /* pointer to symbolic link */
u_short c_symlen; /* length of symbolic link */
dev_t c_device; /* associated vnode device */
struct cdev *c_device; /* associated vnode device */
ino_t c_inode; /* associated vnode inode */
struct cnode *c_next; /* links if on NetBSD machine */
};
@ -153,7 +153,7 @@ struct coda_mntinfo {
struct vnode *mi_rootvp;
struct mount *mi_vfsp;
struct vcomm mi_vcomm;
dev_t dev;
struct cdev *dev;
int mi_started;
};
extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */
@ -201,7 +201,7 @@ extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type
extern int coda_vnodeopstats_init(void);
/* coda_vfsops.h */
extern struct mount *devtomp(dev_t dev);
extern struct mount *devtomp(struct cdev *dev);
/* sigh */
#define CODA_RDWR ((u_long) 31)

View File

@ -58,7 +58,7 @@ typedef unsigned long u_long;
typedef unsigned int u_int;
typedef unsigned short u_short;
typedef u_long ino_t;
typedef u_long dev_t;
typedef u_long struct cdev *;
typedef void * caddr_t;
#ifdef DOS
typedef unsigned __int64 u_quad_t;

View File

@ -174,7 +174,7 @@ printf("error = %d\n", error);
/* for DEVFS, using bpf & tun drivers as examples*/
static void coda_fbsd_drvinit(void *unused);
static void coda_fbsd_drvuninit(void *unused);
static void coda_fbsd_clone(void *arg, char *name, int namelen, dev_t *dev);
static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev);
static eventhandler_tag clonetag;
@ -182,7 +182,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
dev_t *dev;
struct cdev **dev;
{
int u;

View File

@ -117,7 +117,7 @@ vcodaattach(n)
int
vc_nb_open(dev, flag, mode, td)
dev_t dev;
struct cdev *dev;
int flag;
int mode;
struct thread *td; /* NetBSD only */
@ -149,7 +149,7 @@ vc_nb_open(dev, flag, mode, td)
int
vc_nb_close (dev, flag, mode, td)
dev_t dev;
struct cdev *dev;
int flag;
int mode;
struct thread *td;
@ -233,7 +233,7 @@ vc_nb_close (dev, flag, mode, td)
int
vc_nb_read(dev, uiop, flag)
dev_t dev;
struct cdev *dev;
struct uio *uiop;
int flag;
{
@ -287,7 +287,7 @@ vc_nb_read(dev, uiop, flag)
int
vc_nb_write(dev, uiop, flag)
dev_t dev;
struct cdev *dev;
struct uio *uiop;
int flag;
{
@ -387,7 +387,7 @@ vc_nb_write(dev, uiop, flag)
int
vc_nb_ioctl(dev, cmd, addr, flag, td)
dev_t dev;
struct cdev *dev;
u_long cmd;
caddr_t addr;
int flag;
@ -441,7 +441,7 @@ vc_nb_ioctl(dev, cmd, addr, flag, td)
int
vc_nb_poll(dev, events, td)
dev_t dev;
struct cdev *dev;
int events;
struct thread *td;
{

View File

@ -31,9 +31,9 @@
*
*/
int vc_nb_open(dev_t dev, int flag, int mode, struct thread *p);
int vc_nb_close (dev_t dev, int flag, int mode, struct thread *p);
int vc_nb_read(dev_t dev, struct uio *uiop, int flag);
int vc_nb_write(dev_t dev, struct uio *uiop, int flag);
int vc_nb_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *p);
int vc_nb_poll(dev_t dev, int events, struct thread *p);
int vc_nb_open(struct cdev *dev, int flag, int mode, struct thread *p);
int vc_nb_close (struct cdev *dev, int flag, int mode, struct thread *p);
int vc_nb_read(struct cdev *dev, struct uio *uiop, int flag);
int vc_nb_write(struct cdev *dev, struct uio *uiop, int flag);
int vc_nb_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p);
int vc_nb_poll(struct cdev *dev, int events, struct thread *p);

View File

@ -198,7 +198,7 @@ venus_root(void *mdp,
int
venus_open(void *mdp, CodaFid *fid, int flag,
struct ucred *cred, struct proc *p,
/*out*/ dev_t *dev, ino_t *inode)
/*out*/ struct cdev **dev, ino_t *inode)
{
int cflag;
DECL(coda_open); /* sets Isize & Osize */

View File

@ -39,7 +39,7 @@ venus_root(void *mdp,
int
venus_open(void *mdp, CodaFid *fid, int flag,
struct ucred *cred, struct proc *p,
/*out*/ dev_t *dev, ino_t *inode);
/*out*/ struct cdev **dev, ino_t *inode);
int
venus_close(void *mdp, CodaFid *fid, int flag,

View File

@ -81,7 +81,7 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE];
#define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++)
extern int coda_nc_initialized; /* Set if cache has been initialized */
extern int vc_nb_open(dev_t, int, int, struct thread *);
extern int vc_nb_open(struct cdev *, int, int, struct thread *);
int
coda_vfsopstats_init(void)
@ -114,7 +114,7 @@ coda_mount(vfsp, path, data, ndp, td)
{
struct vnode *dvp;
struct cnode *cp;
dev_t dev;
struct cdev *dev;
struct coda_mntinfo *mi;
struct vnode *rootvp;
CodaFid rootfid = INVAL_FID;
@ -528,7 +528,7 @@ getNewVnode(vpp)
* device corresponds to a UFS. Return NULL if no device is found.
*/
struct mount *devtomp(dev)
dev_t dev;
struct cdev *dev;
{
struct mount *mp;

View File

@ -238,7 +238,7 @@ coda_open(v)
/* locals */
int error;
struct vnode *vp;
dev_t dev;
struct cdev *dev;
ino_t inode;
MARK_ENTRY(CODA_OPEN_STATS);
@ -1806,7 +1806,7 @@ coda_islocked(v)
/* How one looks up a vnode given a device/inode pair: */
int
coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp)
coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp)
{
/* This is like VFS_VGET() or igetinode()! */
int error;

View File

@ -82,6 +82,6 @@ int coda_pathconf(void *);
int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw,
int ioflag, struct ucred *cred, struct thread *td);
int coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp);
int coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp);
void print_vattr(struct vattr *attr);
void print_cred(struct ucred *cred);

View File

@ -55,7 +55,7 @@ newstat_copyout(struct stat *buf, void *ubuf)
{
struct l_newstat tbuf;
struct cdevsw *cdevsw;
dev_t dev;
struct cdev *dev;
bzero(&tbuf, sizeof(tbuf));
tbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8);
@ -342,7 +342,7 @@ int
linux_ustat(struct thread *td, struct linux_ustat_args *args)
{
struct l_ustat lu;
dev_t dev;
struct cdev *dev;
struct vnode *vp;
struct statfs *stat;
int error;
@ -360,9 +360,9 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args)
/*
* XXX - Don't return an error if we can't find a vnode for the
* device. Our dev_t is 32-bits whereas Linux only has a 16-bits
* dev_t. The dev_t that is used now may as well be a truncated
* dev_t returned from previous syscalls. Just return a bzeroed
* device. Our struct cdev *is 32-bits whereas Linux only has a 16-bits
* struct cdev *. The struct cdev *that is used now may as well be a truncated
* struct cdev *returned from previous syscalls. Just return a bzeroed
* ustat in that case.
*/
dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF));
@ -393,7 +393,7 @@ stat64_copyout(struct stat *buf, void *ubuf)
{
struct l_stat64 lbuf;
struct cdevsw *cdevsw;
dev_t dev;
struct cdev *dev;
bzero(&lbuf, sizeof(lbuf));
lbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8);

View File

@ -79,7 +79,7 @@ static struct fla_s {
struct doc2k_stat ds;
struct bio_queue_head bio_queue;
struct disk *disk;
dev_t dev;
struct cdev *dev;
} softc[8];
static int

View File

@ -665,7 +665,11 @@ struct thread *td;
# else
)
# endif
#ifdef _KERNEL
struct cdev *dev;
#else
dev_t dev;
#endif
# if defined(__NetBSD__) || defined(__OpenBSD__) || \
(_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000)
u_long cmd;
@ -1135,7 +1139,7 @@ struct thread *td;
# else
)
# endif
dev_t dev;
struct cdev *dev;
int flags;
# endif /* __sgi */
{
@ -1165,7 +1169,7 @@ struct thread *td;
# else
)
# endif
dev_t dev;
struct cdev *dev;
int flags;
# endif /* __sgi */
{
@ -1193,7 +1197,7 @@ int ioflag;
# else
int IPL_EXTERN(read)(dev, uio)
# endif
dev_t dev;
struct cdev *dev;
register struct uio *uio;
# endif /* __sgi */
{

View File

@ -574,12 +574,12 @@ extern int iplidentify __P((char *));
(NetBSD >= 199511) || defined(__OpenBSD__)
# if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \
defined(__OpenBSD__) || (__FreeBSD_version >= 300000)
extern int iplioctl __P((dev_t, u_long, caddr_t, int, struct thread *));
extern int iplioctl __P((struct cdev *, u_long, caddr_t, int, struct thread *));
# else
extern int iplioctl __P((dev_t, int, caddr_t, int, struct thread *));
# endif
extern int iplopen __P((dev_t, int, int, struct thread *));
extern int iplclose __P((dev_t, int, int, struct thread *));
extern int iplopen __P((struct cdev *, int, int, struct thread *));
extern int iplclose __P((struct cdev *, int, int, struct thread *));
# else
# ifndef linux
extern int iplopen __P((dev_t, int));
@ -592,7 +592,7 @@ extern void iplclose __P((struct inode *, struct file *));
# endif /* !linux */
# endif /* (_BSDI_VERSION >= 199510) */
# if BSD >= 199306
extern int iplread __P((dev_t, struct uio *, int));
extern int iplread __P((struct cdev *, struct uio *, int));
# else
# ifndef linux
extern int iplread __P((dev_t, struct uio *));

View File

@ -55,7 +55,7 @@
#include <netinet/ip_frag.h>
#include <netinet/ip_proxy.h>
static dev_t ipf_devs[IPL_LOGMAX + 1];
static struct cdev *ipf_devs[IPL_LOGMAX + 1];
SYSCTL_DECL(_net_inet);
SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");

View File

@ -103,8 +103,8 @@ void cleanup_pf_zone(void);
int pfattach(void);
#else
void pfattach(int);
int pfopen(dev_t, int, int, struct proc *);
int pfclose(dev_t, int, int, struct proc *);
int pfopen(struct cdev *, int, int, struct proc *);
int pfclose(struct cdev *, int, int, struct proc *);
#endif
struct pf_pool *pf_get_pool(char *, char *, u_int32_t,
u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t);
@ -113,9 +113,9 @@ void pf_init_ruleset(struct pf_ruleset *);
void pf_mv_pool(struct pf_palist *, struct pf_palist *);
void pf_empty_pool(struct pf_palist *);
#ifdef __FreeBSD__
int pfioctl(dev_t, u_long, caddr_t, int, struct thread *);
int pfioctl(struct cdev *, u_long, caddr_t, int, struct thread *);
#else
int pfioctl(dev_t, u_long, caddr_t, int, struct proc *);
int pfioctl(struct cdev *, u_long, caddr_t, int, struct proc *);
#endif
#ifdef __FreeBSD__
@ -139,7 +139,7 @@ TAILQ_HEAD(pf_tags, pf_tagname) pf_tags = TAILQ_HEAD_INITIALIZER(pf_tags);
#ifdef __FreeBSD__
static dev_t pf_dev;
static struct cdev *pf_dev;
/*
* XXX - These are new and need to be checked when moveing to a new version
@ -421,7 +421,7 @@ pfattach(int num)
}
int
pfopen(dev_t dev, int flags, int fmt, struct proc *p)
pfopen(struct cdev *dev, int flags, int fmt, struct proc *p)
{
if (minor(dev) >= 1)
return (ENXIO);
@ -429,7 +429,7 @@ pfopen(dev_t dev, int flags, int fmt, struct proc *p)
}
int
pfclose(dev_t dev, int flags, int fmt, struct proc *p)
pfclose(struct cdev *dev, int flags, int fmt, struct proc *p)
{
if (minor(dev) >= 1)
return (ENXIO);
@ -771,10 +771,10 @@ pf_tag_unref(u_int16_t tag)
#ifdef __FreeBSD__
int
pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
#else
int
pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
#endif
{
struct pf_pooladdr *pa = NULL;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 @@ sioopen(dev, flag, mode, td)
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 @@ siointr1(vcom)
static int
sioioctl(dev, cmd, data, flag, td)
dev_t dev;
struct cdev *dev;
u_long cmd;
caddr_t data;
int flag;

View File

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

View File

@ -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 @@ digiopen(dev_t dev, int flag, int mode, struct thread *td)
}
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;

View File

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

View File

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

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

@ -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];

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 @@ fw_read (dev_t dev, struct uio *uio, int ioflag)
}
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 @@ fw_write (dev_t dev, struct uio *uio, int ioflag)
* 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 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
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"};

View File

@ -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 @@ fwmem_strategy(struct bio *bp)
}
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;

View File

@ -345,7 +345,7 @@ fwphy_rddata(struct fwohci_softc *sc, u_int addr)
}
/* 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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More