2.6 patches for larger dev_t
authorDave Airlie <airlied@linux.ie>
Thu, 8 Apr 2004 12:22:22 +0000 (12:22 +0000)
committerDave Airlie <airlied@linux.ie>
Thu, 8 Apr 2004 12:22:22 +0000 (12:22 +0000)
linux-core/drm_drv.c
linux/drm_drv.h

index 06eaf3b..35876dc 100644 (file)
@@ -790,7 +790,7 @@ int DRM(open)( struct inode *inode, struct file *filp )
        int i;
 
        for (i = 0; i < DRM(numdevs); i++) {
-               if (minor(inode->i_rdev) == DRM(device)[i].minor) {
+               if (iminor(inode) == DRM(device)[i].minor) {
                        dev = &(DRM(device)[i]);
                        break;
                }
@@ -843,7 +843,7 @@ int DRM(release)( struct inode *inode, struct file *filp )
         */
 
        DRM_DEBUG( "pid = %d, device = 0x%lx, open_count = %d\n",
-                  current->pid, (long)dev->device, dev->open_count );
+                  current->pid, (long)old_encode_dev(dev->device), dev->open_count );
 
        if ( priv->lock_count && dev->lock.hw_lock &&
             _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) &&
@@ -998,7 +998,7 @@ int DRM(ioctl)( struct inode *inode, struct file *filp,
        ++priv->ioctl_count;
 
        DRM_DEBUG( "pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
-                  current->pid, cmd, nr, (long)dev->device
+                  current->pid, cmd, nr, (long)old_encode_dev(dev->device)
                   priv->authenticated );
 
        if ( nr >= DRIVER_IOCTL_COUNT ) {
index 06eaf3b..35876dc 100644 (file)
@@ -790,7 +790,7 @@ int DRM(open)( struct inode *inode, struct file *filp )
        int i;
 
        for (i = 0; i < DRM(numdevs); i++) {
-               if (minor(inode->i_rdev) == DRM(device)[i].minor) {
+               if (iminor(inode) == DRM(device)[i].minor) {
                        dev = &(DRM(device)[i]);
                        break;
                }
@@ -843,7 +843,7 @@ int DRM(release)( struct inode *inode, struct file *filp )
         */
 
        DRM_DEBUG( "pid = %d, device = 0x%lx, open_count = %d\n",
-                  current->pid, (long)dev->device, dev->open_count );
+                  current->pid, (long)old_encode_dev(dev->device), dev->open_count );
 
        if ( priv->lock_count && dev->lock.hw_lock &&
             _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) &&
@@ -998,7 +998,7 @@ int DRM(ioctl)( struct inode *inode, struct file *filp,
        ++priv->ioctl_count;
 
        DRM_DEBUG( "pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
-                  current->pid, cmd, nr, (long)dev->device
+                  current->pid, cmd, nr, (long)old_encode_dev(dev->device)
                   priv->authenticated );
 
        if ( nr >= DRIVER_IOCTL_COUNT ) {