proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / bus / pccard / pccard.c
index c34a1da..e0e48d7 100644 (file)
@@ -30,7 +30,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pccard/pccard.c,v 1.106.2.15 2003/02/26 18:42:00 imp Exp $
- * $DragonFly: src/sys/bus/pccard/pccard.c,v 1.3 2003/06/23 17:55:48 dillon Exp $
+ * $DragonFly: src/sys/bus/pccard/pccard.c,v 1.4 2003/06/25 03:56:09 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -523,7 +523,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td)
         * At the very least, we only allow root to set the context.
         */
        case PIOCSMEM:
-               if (suser_xxx(td->td_proc->p_ucred, 0))
+               if (suser(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, d_thread_t *td)
         * Set I/O port context.
         */
        case PIOCSIO:
-               if (suser_xxx(td->td_proc->p_ucred, 0))
+               if (suser(td))
                        return (EPERM);
                if (slt->state != filled)
                        return (ENXIO);
@@ -573,7 +573,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td)
                        *(unsigned long *)data = pccard_mem;
                        break;
                }
-               if (suser_xxx(td->td_proc->p_ucred, 0))
+               if (suser(td))
                        return (EPERM);
                /*
                 * Validate the memory by checking it against the I/O
@@ -605,7 +605,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td)
         * Allocate a driver to this slot.
         */
        case PIOCSDRV:
-               if (suser_xxx(td->td_proc->p_ucred, 0))
+               if (suser(td))
                        return (EPERM);
                err = allocate_driver(slt, (struct dev_desc *)data);
                if (!err)