aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard/pccard.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r--sys/pccard/pccard.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 0a02e024bc8a..f98bf0a49f02 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -330,7 +330,7 @@ pccard_event(struct slot *slt, enum card_event event)
* Device driver interface.
*/
static int
-crdopen(dev_t dev, int oflags, int devtype, struct proc *p)
+crdopen(dev_t dev, int oflags, int devtype, struct thread *td)
{
struct slot *slt = PCCARD_DEV2SOFTC(dev);
@@ -346,7 +346,7 @@ crdopen(dev_t dev, int oflags, int devtype, struct proc *p)
* slots may be assigned to drivers already.
*/
static int
-crdclose(dev_t dev, int fflag, int devtype, struct proc *p)
+crdclose(dev_t dev, int fflag, int devtype, struct thread *td)
{
return (0);
}
@@ -447,7 +447,7 @@ crdwrite(dev_t dev, struct uio *uio, int ioflag)
* descriptors, and assignment of drivers.
*/
static int
-crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
+crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
u_int32_t addr;
int err;
@@ -497,7 +497,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* At the very least, we only allow root to set the context.
*/
case PIOCSMEM:
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
if (slt->state != filled)
return (ENXIO);
@@ -522,7 +522,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* Set I/O port context.
*/
case PIOCSIO:
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
if (slt->state != filled)
return (ENXIO);
@@ -548,7 +548,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
*(unsigned long *)data = pccard_mem;
break;
}
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
/*
* Validate the memory by checking it against the I/O
@@ -580,7 +580,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* Allocate a driver to this slot.
*/
case PIOCSDRV:
- if (suser(p))
+ if (suser_td(td))
return (EPERM);
err = allocate_driver(slt, (struct dev_desc *)data);
if (!err)
@@ -617,7 +617,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
* when a change in card status occurs.
*/
static int
-crdpoll(dev_t dev, int events, struct proc *p)
+crdpoll(dev_t dev, int events, struct thread *td)
{
int revents = 0;
int s;
@@ -638,7 +638,7 @@ crdpoll(dev_t dev, int events, struct proc *p)
revents |= POLLRDBAND;
if (revents == 0)
- selrecord(p, &slt->selp);
+ selrecord(td, &slt->selp);
splx(s);
return (revents);