[vox-tech] lego USB tower module - the author speaks

Peter Jay Salzman vox-tech@lists.lugod.org
Sun, 7 Jul 2002 12:38:54 -0700


hoo kay,

presumably you saw my email to the module author.  this was his
response.

pete


----- Forwarded message from Richard Lucock -----

From: Richard Lucock
Subject: Re: lego USB tower
To: p@dirac.org

Hi,

> loaded.  there are two curious things about the above output:
> first, lego was assigned minor number 0, when it should've taken 64.

        An error; 0 is the index into my local table, I forgot to add
the offset (64) when printing this message. By the way, the value for
the minor number will change when I get an official value, for the
moment I have just stolen the one for the rio500.

> second, the "device node registration failed" message is disheartening.

        Another error; the code shouldn't fail here, since a NULL
return just means that devfs is not in use (Since the kernel routine
devfs_register() is actually available on your system, I assume that
you are using a 2.4 or later kernel; I haven't really thought about
support for 2.2 or earlier).

        I have attached a patch for both of these errors.

Good luck,
        Richard


--- lego.c	Sun Jul  7 19:28:57 2002
+++ lego.c.orig	Mon Jul  1 22:30:31 2002
@@ -951,7 +951,7 @@
       goto probe_exit;
       }
 
-   info(__FUNCTION__ ": Allocated minor %d", lego_minor+LEGO_MINOR);
+   info(__FUNCTION__ ": Allocated minor %d", lego_minor);
 
    /* Private data for this instance */
 
@@ -1011,7 +1011,10 @@
    }
 
    if(lego->devfs == NULL)
-      dbg(__FUNCTION__ ": device node registration failed");
+      {
+      err(__FUNCTION__ ": device node registration failed");
+      goto probe_exit;
+      }
 
    init_MUTEX(&(lego->lock));
 




----- End forwarded message -----

-- 
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D