public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Petreley <nicholas@petreley.com>
To: linux-kernel@vger.kernel.org
Subject: NVidia patch for kdev_t
Date: Wed, 9 Jan 2002 16:13:59 -0800	[thread overview]
Message-ID: <20020110001357.GA1654@petreley.com> (raw)

Re: The fellow who noted that kdev_t breaks the current nv.c driver.

I'm just guessing here based on what other patches I've seen, so pardon me
if this isn't the proper way to handle the change, or if I missed anything. 
But it worked for me and my GeForce3.  This patch is against
NVIDIA_kernel-1.0-2314.

--- nv.c Fri Nov 30 20:11:06 2001
+++ NVIDIA_kernel-1.0-2314/nv.c  Thu Jan  3 17:18:42 2002
@@ -1146,11 +1146,11 @@

     /* for control device, just jump to its open routine */
     /* after setting up the private data */
-    if (NV_DEVICE_IS_CONTROL_DEVICE(inode->i_rdev))
+    if (NV_DEVICE_IS_CONTROL_DEVICE(minor(inode->i_rdev)))
         return nv_kern_ctl_open(inode, file);

     /* what device are we talking about? */
-    devnum = NV_DEVICE_NUMBER(inode->i_rdev);
+    devnum = NV_DEVICE_NUMBER(minor(inode->i_rdev));
     if (devnum >= NV_MAX_DEVICES)
     {
         rc = -ENODEV;
@@ -1257,7 +1257,7 @@

     /* for control device, just jump to its open routine */
     /* after setting up the private data */
-    if (NV_DEVICE_IS_CONTROL_DEVICE(inode->i_rdev))
+    if (NV_DEVICE_IS_CONTROL_DEVICE(minor(inode->i_rdev)))
         return nv_kern_ctl_close(inode, file);

     NV_DMSG(nv, "close");






-- 
***********************************************************
Nicholas Petreley        http://www.VarLinux.org
nicholas@petreley.com    http://www.computerworld.com
http://www.petreley.org  http://www.linuxworld.com Eph 6:12
***********************************************************

                 reply	other threads:[~2002-01-10  0:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020110001357.GA1654@petreley.com \
    --to=nicholas@petreley.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox