Rename seq_* to mseq_*, to avoid clashes with seq.h (namely, seq_read.)

This commit is contained in:
Adrian Chadd 2015-06-26 04:12:06 +00:00
parent b1cf398e01
commit f902ea0761

View File

@ -98,21 +98,21 @@ __FBSDID("$FreeBSD$");
#define MIDIDEV(y) (dev2unit(y) & 0x0f)
/* These are the entries to the sequencer driver. */
static d_open_t seq_open;
static d_close_t seq_close;
static d_ioctl_t seq_ioctl;
static d_read_t seq_read;
static d_write_t seq_write;
static d_poll_t seq_poll;
static d_open_t mseq_open;
static d_close_t mseq_close;
static d_ioctl_t mseq_ioctl;
static d_read_t mseq_read;
static d_write_t mseq_write;
static d_poll_t mseq_poll;
static struct cdevsw seq_cdevsw = {
.d_version = D_VERSION,
.d_open = seq_open,
.d_close = seq_close,
.d_read = seq_read,
.d_write = seq_write,
.d_ioctl = seq_ioctl,
.d_poll = seq_poll,
.d_open = mseq_open,
.d_close = mseq_close,
.d_read = mseq_read,
.d_write = mseq_write,
.d_ioctl = mseq_ioctl,
.d_poll = mseq_poll,
.d_name = "sequencer",
};
@ -737,7 +737,7 @@ seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md)
}
int
seq_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
mseq_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
struct seq_softc *scp = i_dev->si_drv1;
int i;
@ -817,10 +817,10 @@ seq_open(struct cdev *i_dev, int flags, int mode, struct thread *td)
}
/*
* seq_close
* mseq_close
*/
int
seq_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
mseq_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
{
int i;
struct seq_softc *scp = i_dev->si_drv1;
@ -858,7 +858,7 @@ seq_close(struct cdev *i_dev, int flags, int mode, struct thread *td)
}
int
seq_read(struct cdev *i_dev, struct uio *uio, int ioflag)
mseq_read(struct cdev *i_dev, struct uio *uio, int ioflag)
{
int retval, used;
struct seq_softc *scp = i_dev->si_drv1;
@ -869,12 +869,12 @@ seq_read(struct cdev *i_dev, struct uio *uio, int ioflag)
if (scp == NULL)
return ENXIO;
SEQ_DEBUG(7, printf("seq_read: unit %d, resid %zd.\n",
SEQ_DEBUG(7, printf("mseq_read: unit %d, resid %zd.\n",
scp->unit, uio->uio_resid));
mtx_lock(&scp->seq_lock);
if ((scp->fflags & FREAD) == 0) {
SEQ_DEBUG(2, printf("seq_read: unit %d is not for reading.\n",
SEQ_DEBUG(2, printf("mseq_read: unit %d is not for reading.\n",
scp->unit));
retval = EIO;
goto err1;
@ -927,14 +927,14 @@ seq_read(struct cdev *i_dev, struct uio *uio, int ioflag)
retval = 0;
err1:
mtx_unlock(&scp->seq_lock);
SEQ_DEBUG(6, printf("seq_read: ret %d, resid %zd.\n",
SEQ_DEBUG(6, printf("mseq_read: ret %d, resid %zd.\n",
retval, uio->uio_resid));
return retval;
}
int
seq_write(struct cdev *i_dev, struct uio *uio, int ioflag)
mseq_write(struct cdev *i_dev, struct uio *uio, int ioflag)
{
u_char event[EV_SZ], newevent[EV_SZ], ev_code;
struct seq_softc *scp = i_dev->si_drv1;
@ -1113,7 +1113,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int ioflag)
}
int
seq_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
mseq_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
struct thread *td)
{
int midiunit, ret, tmp;
@ -1417,7 +1417,7 @@ seq_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
}
int
seq_poll(struct cdev *i_dev, int events, struct thread *td)
mseq_poll(struct cdev *i_dev, int events, struct thread *td)
{
int ret, lim;
struct seq_softc *scp = i_dev->si_drv1;